Skip to content

Instantly share code, notes, and snippets.

@alewolf
Last active August 18, 2021 19:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alewolf/d62a344f45b8dce1a1cf21dc7be6dbec to your computer and use it in GitHub Desktop.
Save alewolf/d62a344f45b8dce1a1cf21dc7be6dbec to your computer and use it in GitHub Desktop.
(function(){
try {
let observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.attributeName === "class") {
let attributeValue = jQuery(mutation.target).prop(mutation.attributeName);
if (attributeValue.includes('disabled')) {
jQuery('.fs-modal').find('.button-deactivate').removeClass('disabled');;
}
}
});
});
observer.observe(jQuery('.fs-modal').find('.button-deactivate')[0], {
attributes: true
});
} catch (error) {
console.error(error);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment