Skip to content

Instantly share code, notes, and snippets.

@aseemk aseemk/1-instructions.md
Last active Nov 27, 2016

Embed
What would you like to do?
Bookmarklet template!

TODO: Add description of your bookmarklet here.

To add this bookmarklet to your browser, instructions for Chrome:

  1. Right-click your Bookmarks Bar.
  2. Click "Add Page..."
  3. For "Name", type "TODO: Title here".
  4. For "URL", copy-paste the below:
javascript:!function(){alert("It worked!")}();

Developer instructions:

  1. Write your raw source code in the 2-source.js file below.
  2. After testing, plug the source into JSCompress. This is important in particular to strip inline comments (which at least Chrome doesn't support in bookmarklets, because newlines are stripped).
  3. Paste the result into the code block above, after javascript:.

Enjoy!

/**
* MIT license. (c) YOUR NAME.
*/
(function () {
// TODO:
alert('It worked!');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.