1
0
mirror of https://github.com/thebaer/MMRA synced 2024-11-13 10:11:01 +00:00

Block "Pardon the interruption" popup

This blocks the annoying "Pardon the interruption" dialog without
preventing other parts of the UI from working correctly (basically.
see comments).
This commit is contained in:
Matt Baer 2018-04-25 22:39:17 -04:00
parent 9d4599f554
commit 159e44a19d
2 changed files with 14 additions and 3 deletions

View File

@ -9,6 +9,19 @@ var makeReadable = function() {
topNav.classList.remove('u-fixed');
}
// Remove the "Pardon the interruption" popup.
// We do this with JS because the .overlay.overlay--lighter element is used
// for interactions we consent to, like the sign up / log in dialogs, so we
// don't want to obliterate them too.
// FIXME: prevent this from breaking signup/login dialogs when the popup
// is removed (it works after changing pages).
var headings = document.evaluate("//h1[contains(., 'Pardon the interruption.')]", document, null, XPathResult.ANY_TYPE, null );
var thisHeading = headings.iterateNext();
if (thisHeading != null) {
var $overlay = thisHeading.parentNode.parentNode.parentNode.parentNode;
$overlay.parentNode.removeChild($overlay);
}
// Inject remaining styles
// This check makes sure the extension works on Chrome and Firefox.
if (typeof browser === 'undefined') {

View File

@ -6,9 +6,7 @@
.openInAppButton,
.js-stickyFooter,
.js-upgradeMembershipAction,
.butterBar--privacy,
.overlay,
.overlay--lighter {
.butterBar--privacy {
display: none;
}