(Deprecated - use this extension instead) Save code to Bookmarks.dev Browser Extension
Browser extension to save code snippets to www.bookmarks.dev, the Bookmarks and Code Snippets Manager for Developers & Co.
This browser extension is available for:
Chrome | Firefox |
If your company blocks Browser Extensions, or you have a tight security blocking pop-up windows from extensions (Firefox blocks new windows from pages by default) you can use the our bookmarklets - snippets which offer the same functionality
Select code snippet on page AND (right click OR click the extension icon) to save it to Bookmarks.dev.
A popup window is launched where you can add additional metadata to the code snippet record.
You need to have an account to save code to your code snippets
For youtube videos and stackoverflow questions the tags auto-completed
Check out the git repository - git clone https://github.com/BookmarksDev/code-snippets-browser-extension
Go to chrome://extensions/, click Load unpacked and select the code-snippets-browser-extension
folder
where you have checked it out:
Click "Reload" on the extension when you do modifications
Use web-ext
The easiest way is to use web-ext You can install it globally for example via
npm install --global web-ext
and then run the following command in the root directory of the project
web-ext run
This installs "Save code to Bookmarks.dev" as a temporary add-on and it watches for changes in the source code and redeploys automatically.
Go to about:debugging#/runtime/this-firefox, click Load Temporary Add-on...
and select the manifest.json
file from the code-snippets-browser-extension
folder where you have checked it out:
Click "Reload" on the extension when you do modifications
Test the extension against the localhost
version of Bookmarks.dev
Change the host
url in the following line from launch-bookmarksdev-dialog.js:
const url = 'https://www.bookmarks.dev/my-codelets/new?sourceUrl=' + encodeURIComponent(l) + '&code=' + encodeURIComponent(d) + '&title=' + encodeURIComponent(t) + '&popup=true'
to
const url = 'http://localhost:4200/my-codelets/new?sourceUrl=' + encodeURIComponent(l) + '&code=' + encodeURIComponent(d) + '&title=' + encodeURIComponent(t) + '&popup=true'
and then Reload the extension with one of the mechanisms mentioned before
First of all zip the file either with web-ext
web-ext build -i 'resources'
or with standard zip
command:
zip -r releases/code-snippets.bookmarks.dev.chrome.extension.zip * -x *.idea* *.git* '*resources/*' '*web-ext-artifacts/*'
Go to Chrome Webstore Dashboard where you upload the .zip file. Wait for a couple of business days for an approval.