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

Merge pull request #29 from jorgegonzalez/master

Hide some annoyances
This commit is contained in:
Matt Baer 2018-04-27 13:41:03 -04:00 committed by GitHub
commit 654839d01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -9,6 +9,19 @@ var makeReadable = function() {
topNav.classList.remove('u-fixed'); 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 // Inject remaining styles
// This check makes sure the extension works on Chrome and Firefox. // This check makes sure the extension works on Chrome and Firefox.
if (typeof browser === 'undefined') { if (typeof browser === 'undefined') {

View File

@ -5,6 +5,12 @@
.postMeterBar, .postMeterBar,
.openInAppButton, .openInAppButton,
.js-stickyFooter, .js-stickyFooter,
.js-upgradeMembershipAction { .js-upgradeMembershipAction,
.butterBar--privacy {
display: none; display: none;
} }
/* Makes the page scrollable after hiding "Pardon the interruption" popup */
html.u-overflowHidden {
overflow-y: scroll !important;
}