Skip to content

Instantly share code, notes, and snippets.

@Matojeje
Created April 4, 2023 03:36
Show Gist options
  • Save Matojeje/829f6414055a4a469aff80b71a5585e1 to your computer and use it in GitHub Desktop.
Save Matojeje/829f6414055a4a469aff80b71a5585e1 to your computer and use it in GitHub Desktop.
DjMuffinTops presentation bookmarklet
javascript:(function(){document.body.innerHTML+=`<djbutton style="position: fixed; bottom: 0px; right: 0px; width: 50vmin; perspective: 100vmin;"><img src="https://cdn.discordapp.com/attachments/473963532782665738/1092641417240793169/dj_button.png" style="width: 100%"><canvas style="position: absolute; background: white -moz-element(#${[...document.querySelectorAll('body *')].find(el => el.id && el.tagName !== 'SCRIPT' && !el.closest('script') && el.tagName !== 'LINK' && !el.closest('link') && el.tagName !== 'STYLE' && !el.closest('style'))?.id}) no-repeat scroll center center / contain; right: 6%; transform: rotateY(-34deg) rotateZ(1deg); top: 14%; height: 37%; width: 42%;" width="192" height="108"></canvas></djbutton>`})();
@Matojeje
Copy link
Author

Matojeje commented Apr 4, 2023

This will add an enthusiastic Drew the Riolu in the bottom right corner of your page!
You can use this like any other bookmarklet:

  • Make a new bookmark in your web browser
  • Put the entire code in as the bookmark's URL address
  • Go to any page and click on the bookmark

As an added bonus, when on Firefox, the current page's thumbnail should display as whatever Drew is pointing to:

Example 1 Example 2 Example 3 Example 4
Example1 Example2 Example3 Example4
Timestamp generator PW homepage EZgif Ko-fi

Note
If that doesn't work, go to the inspector, find the djbutton element at the bottom of the tree view, and in the canvas' style, edit the background's targeted element ID inside -moz-element. Sometimes the bookmarklet picks bad IDs to target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment