Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

[Bookmarklet] Nuke Persistent Tooltips

1788157017

Edited 1789176446
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You've probably encountered this: You are editing some handout, your cursor strays over the editing toolbar, a tooltip pops up, and then it just won't go away? If it happens in a game, you either have to live with it, or tell everyone to wait while you refresh the screen. Annoying!!! Here is a way to solvve that problem and get on with your game. A Bookmarklet is a snippet of Javascript code that lives in a browser bookmark. To create it, just make a regular bookmark, but instead of having it go to a URL, input this pit of JS code: javascript:(function(){   const tooltips = document.querySelectorAll('.ui-tooltip, [role="tooltip"], .tooltip');   let count = 0;   tooltips.forEach(el => {     el.remove();     count++;   });   console.log(`[Roll20 Fix] Removed ${count} stuck tooltip(s).`); })(); And poof! Nightmare averted. If you are the type who would rather do this manually that trust someone's code on the Internet, here is what it does, in steps that you can perform manually: Right-click directly on the floating tooltip text, ex: (Outdent (⌘+[)). Select Inspect (or press F12 / Cmd+Option+I on a Mac). In the Elements panel that opens, the highlighted HTML line corresponding to the tooltip container will be selected. Press Delete or Backspace on your keyboard to remove the element node. EDIT: I've been asked for more explicit instructions on how to make a bookmarklet: How to Add the "Clear Stuc k Tooltips" Button This adds a quick button to your browser bar that clears stuck Roll20 popups instantly whenever clicked. Step 1: Make sure your Bookmarks Bar is visible Chrome / Edge: Press Ctrl + Shift + B (Windows) or Cmd + Shift + B (Mac). Firefox: Right-click an empty space on your top toolbar and check Bookmarks Toolbar. Step 2: Create the bookmark Right-click anywhere on your Bookmarks Bar at the top of your screen. Click Add page... (or Add Bookmark...). Step 3: Fill in the details Name: Type Nuke Tooltips (or whatever you'd like). URL / Location: Copy and paste this exact line of code into the box. It's the same as above, but with the spaces and returns removed.: javascript:(function(){document.querySelectorAll('.ui-tooltip, [role="tooltip"], .tooltip').forEach(el=>el.remove());})(); Click Save. How to Use It Whenever a tooltip gets stuck on your Roll20 screen, just click Nuke Tooltips on your bookmarks bar. It disappears instantly without reloading the page! 
+1.  Thanks, Keith.  This has been annoying me for months. It's nice to have a way to resolve without refreshing the browser.