Skip to content

Instantly share code, notes, and snippets.

@Gesugao-san
Forked from fredr/bookmarklet-runner.js
Created October 25, 2021 08:13
Show Gist options
  • Save Gesugao-san/dc3ed6eeb1f02f75d1f415d954ca709e to your computer and use it in GitHub Desktop.
Save Gesugao-san/dc3ed6eeb1f02f75d1f415d954ca709e to your computer and use it in GitHub Desktop.
A bookmarklet that will inject an external script in the browser. (minify, uri encode and add to the href prefixed with "javascript:" in your bookmark)
(function() {
var script = document.createElement('script');
script.async = 1;
script.src = '<url to script>';
document.getElementsByTagName('body')[0].appendChild(script);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment