Skip to content

Instantly share code, notes, and snippets.

@danieliser
Last active May 8, 2020 23:30
Show Gist options
  • Select an option

  • Save danieliser/3a72876b38274e63829107292990d618 to your computer and use it in GitHub Desktop.

Select an option

Save danieliser/3a72876b38274e63829107292990d618 to your computer and use it in GitHub Desktop.
Bookmarklet to toggle Popup Maker trigger highlighting - Create a new bookmark on your browser toolbar, in the spot for the url, paste the script below. When this bookmarklet is clicked on a page with popup triggers they will all get a flashing yellow highlight until turned off again.
javascript:(function($){ $('style#pum-highlighted').remove(); $('body').append($('<style>').attr('id', 'pum-highlighted').text('.pum-highlighted { background-color: rgba(255, 255, 0, .75)!important; }')); function highlight() { if ($('.pum-highlight').hasClass('pum-highlighted')) { $('.pum-highlight').removeClass('pum-highlighted'); } else { $('.pum-highlight').addClass('pum-highlighted'); } } $('.pum-trigger').toggleClass('pum-highlight'); if (window.pum_bookmark_button_highlighter === undefined) { window.pum_bookmark_button_highlighter = setInterval(function(){highlight()}, 500); } }(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment