Skip to content

Instantly share code, notes, and snippets.

@iHiD
Last active October 26, 2023 13:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iHiD/9200866 to your computer and use it in GitHub Desktop.
Save iHiD/9200866 to your computer and use it in GitHub Desktop.
Basic Bookmarklet Code :)
(function (d) {
var modal = d.createElement('div');
modal.setAttribute('style', 'background:rgba(0,0,0,0.8);position: fixed; top: 0; left: 0; width: 100%; height: 100%;');
d.body.appendChild(modal);
var iframe = d.createElement('iframe');
iframe.setAttribute('src', 'https://www.meducation.net/bookmarklet/boards_selector?url=' + encodeURIComponent(location.href));
iframe.setAttribute('scrolling', 'no');
iframe.className = 'modal';
iframe.setAttribute('style', 'zindex:9999999999;display:block;margin:30px auto;width: 400px; height: 500px;');
modal.appendChild(iframe);
})(document)
So prefix this with `javascript:` and compress it to one line and it works a treat. I've been playing with it in the chrome inspetor to get started
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment