Skip to content

Instantly share code, notes, and snippets.

@cgrusden
Forked from conraddecker/gist:1603341
Created January 12, 2012 21:45
Show Gist options
  • Save cgrusden/1603349 to your computer and use it in GitHub Desktop.
Save cgrusden/1603349 to your computer and use it in GitHub Desktop.
Basics for a bookmarklet
javascript: (function () {
_bookmarklet = document.createElement('script');
_bookmarklet.id = 'bookmarklet';
if (document.getElementById(_bookmarklet.id)) {
yimmelet.init();
} else {
_bookmarklet.type = 'text/javascript';
_bookmarklet.src = 'http://assets.domain.com/jsfile.js?x=' + (Math.random());
document.getElementsByTagName('head')[0].appendChild(_bookmarklet);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment