Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marklchaves/39ad3674bb1693b873247aba803a8f18 to your computer and use it in GitHub Desktop.
Save marklchaves/39ad3674bb1693b873247aba803a8f18 to your computer and use it in GitHub Desktop.
Chrome snippet to display a dropdown list of all Popup Maker popups loaded on a page
// https://docs.wppopupmaker.com/article/512-popup-maker-debug-tools
javascript: (function($) {
var $select = $('<select>').attr('id', 'pum-popup-select').css({
zIndex: 9999999999999999,
position: 'fixed',
top: 0,
right: 0
}).on('change', function() {
PUM.open($select.val());
$(this).remove();
}).appendTo('body');
$('<option>').attr('value', '').text('Select a popup').appendTo($select);
$('.pum').each(function() {
var settings = PUM.getSettings(this)
, $option = $('<option>').attr('value', settings.id).text(settings.slug);
$select.append($option);
});
}(jQuery));
@marklchaves
Copy link
Author

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