Skip to content

Instantly share code, notes, and snippets.

@slowpoke-lizard
Created June 15, 2018 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slowpoke-lizard/fb33d344a9b193ddbd643b151c710819 to your computer and use it in GitHub Desktop.
Save slowpoke-lizard/fb33d344a9b193ddbd643b151c710819 to your computer and use it in GitHub Desktop.
$(function () {
var confirmObserver = new MutationObserver(function (mutations) {
// Auto click OK on confirmation dialogs
if ($('.confirm-dialog').is(':visible')) {
$('.confirm-dialog').click();
return;
}
// Auto click Got It on Crafting Rewards dialogs
if ($('.modal-title:contains("Crafting Rewards")').is(':visible')) {
$('.cancel-dialog').click();
return;
}
});
confirmObserver.observe(document.getElementById('app-main'), {attributes: true, childList: false, characterData: false});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment