Extends the Medium writer interface to quickly create and edit Github Gists, without having to leave the editor.
Code Medium Extension
Features
--------
- Adds a button in the text toolbar for creating a new Gist and adding it to the post.
- Gists can be created as either public or secret (unlisted).
- Double click on an existing Gist to edit or delete it.
- Deleting a gist will remove both the embed from the post and the gist from your account.
To only remove the embed, just click on it and press the delete key as usual.
- Syntax highlighting for the most popular programming languages thanks to react-ace!
- Fixes the height of the Gists in the editor, to display them without being cut and without the extra padding (https://github.com/Maluen/code-medium/issues/3).
Authorizing the application
--------
This extension uses the GitHub Gist API to create and edit gists,
this means that you'll have to authorize the OAuth application for the \"gist\" permission.
Once the extension is installed, toggle the extension modal by clicking the toolbar button or by double clicking on an existing gist to
show the login button.
Known Limitations
--------
Gists composed of multiple files aren't fully supported:
- Currently, only single-file gists can be created.
- When double clicking on an existing multi-file gist, only the first file will show up in the modal.
However, you can still edit that file normally and delete the whole gist.
Read more
--------
- Adds a button in the text toolbar for creating a new Gist and adding it to the post.
- Gists can be created as either public or secret (unlisted).
- Double click on an existing Gist to edit or delete it.
- Deleting a gist will remove both the embed from the post and the gist from your account.
To only remove the embed, just click on it and press the delete key as usual.
- Syntax highlighting for the most popular programming languages thanks to react-ace!
- Fixes the height of the Gists in the editor, to display them without being cut and without the extra padding (https://github.com/Maluen/code-medium/issues/3).
Authorizing the application
--------
This extension uses the GitHub Gist API to create and edit gists,
this means that you'll have to authorize the OAuth application for the \"gist\" permission.
Once the extension is installed, toggle the extension modal by clicking the toolbar button or by double clicking on an existing gist to
show the login button.
Known Limitations
--------
Gists composed of multiple files aren't fully supported:
- Currently, only single-file gists can be created.
- When double clicking on an existing multi-file gist, only the first file will show up in the modal.
However, you can still edit that file normally and delete the whole gist.
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhUUr0Z4y8DxD5WIezuYeGW3zDZkvGXST+uviv4jtXwkNVZI5XTUrs/pfYoYsOKdnrxkE47/mI+TiumUj7buB1pC+qeWYjVEshDD5Wum6J44RhXmAo7eb1e3u+IG0BmFvQOO+ENtRxIacZ/M8gexGRIlVWJKuRtcLREc7EkwxtWN58fPrWcYsuXfO3NDEkvrSz7hCCNgeVf/y0MKIz7ZRje8Afb1cRa2PtVAFJ2KUFikzghNFyAY8DVmXXZzrvUDbkeKxA/ja2+5TePhVhKBE+DpFGNUBhb1bEi+pl7ysssxFxjdwiW5/9q58JJeh1Mcu1lnoGIVQTspcd5fbioMNNQIDAQAB", "manifest_version": 3, "minimum_chrome_version": "102", "name": "Code Medium", "version": "0.6.0", "description": "Extends the Medium writer interface to quickly create and edit Github Gists, without having to leave the editor.", "icons": { "48": "assets/icon.png", "128": "assets/icon.png" }, "author": "Manuel Dell'Elce", "short_name": "code-medium", "background": { "service_worker": "background/background.js" }, "action": { "default_icon": { "19": "assets/icon.png", "38": "assets/icon.png" } }, "content_scripts": [ { "matches": [ "https://medium.com/**" ], "js": [ "content/content.js" ], "css": [ "content/content.css" ], "run_at": "document_idle" }, { "matches": [ "https://medium.com/media/*" ], "js": [ "content/content_iframe.js" ], "all_frames": true, "run_at": "document_idle" } ], "web_accessible_resources": [ { "resources": [ "app/*.*" ], "matches": [ "https://medium.com/*" ] } ], "commands": { "medium-create-gist": { "suggested_key": { "default": "Alt+Shift+0" }, "description": "Create a Gist in the Medium Editor" } }, "permissions": [ "identity", "storage" ], "host_permissions": [ "https://github.com/*", "https://gist.github.com/*" ]}
Read more