Created
February 22, 2022 03:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Learn more about Chrome snippets https://developer.chrome.com/docs/devtools/javascript/snippets/