From 2287e7f0afcc53be5cc0709b6eb72b9b96279349 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Fri, 7 Jun 2019 08:27:48 -0400 Subject: [PATCH 1/3] Fix "pardon the interruption" popup block We must no longer "pardon the interruption" -- now we can "extend our stay" and so on. The

text in this popup changed, and there seems to be a few titles that get displayed. So now we look to the

instead for blocking the _readus interruptus_ popup. --- content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content.js b/content.js index 42cce91..90a5e6f 100644 --- a/content.js +++ b/content.js @@ -15,7 +15,7 @@ var makeReadable = function() { // 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 headings = document.evaluate("//h2[contains(., 'one more story in your member preview this month')]", document, null, XPathResult.ANY_TYPE, null ); var thisHeading = headings.iterateNext(); if (thisHeading != null) { var $overlay = thisHeading.parentNode.parentNode.parentNode.parentNode; From b1815e768795551d763f5a3ff0141f1d45f5ef49 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 23 Jul 2019 13:29:17 -0400 Subject: [PATCH 2/3] Fix sticky header bar Medium changed some things; this fixes it again. --- content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content.js b/content.js index 90a5e6f..6d5ca28 100644 --- a/content.js +++ b/content.js @@ -4,9 +4,9 @@ var makeReadable = function() { // Un-position:fixed the top nav bar - var topNav = document.querySelector('.metabar.u-fixed'); + var topNav = document.querySelector('.branch-journeys-top'); if (topNav) { - topNav.classList.remove('u-fixed'); + topNav.parentNode.style.position = 'absolute'; } // Remove the "Pardon the interruption" popup. From 3fdac45d1c7ff737f9ad7f92b533b902b3d09040 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 23 Jul 2019 13:36:46 -0400 Subject: [PATCH 3/3] Block popup again --- content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content.js b/content.js index 6d5ca28..c0fabd1 100644 --- a/content.js +++ b/content.js @@ -15,10 +15,10 @@ var makeReadable = function() { // 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("//h2[contains(., 'one more story in your member preview this month')]", document, null, XPathResult.ANY_TYPE, null ); + var headings = document.evaluate("//h4[contains(., 'one more story in your member preview this month')]", document, null, XPathResult.ANY_TYPE, null ); var thisHeading = headings.iterateNext(); if (thisHeading != null) { - var $overlay = thisHeading.parentNode.parentNode.parentNode.parentNode; + var $overlay = thisHeading.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; $overlay.parentNode.removeChild($overlay); }