From 17efb5f41413e796e10518d924137848f63ee9b5 Mon Sep 17 00:00:00 2001 From: aqulu Date: Thu, 12 Sep 2019 19:31:03 +0900 Subject: [PATCH] fix sticky topbar query --- content.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content.js b/content.js index f96f697..f20f523 100644 --- a/content.js +++ b/content.js @@ -4,9 +4,15 @@ var makeReadable = function() { // Un-position:fixed the top nav bar - var topNav = document.querySelector('.metabar.u-fixed'); + var topNav = document.querySelector('nav.m'); if (topNav) { - topNav.classList.remove('u-fixed'); + topNav.classList.remove('m'); + } + + // remove topbar spacing if present + var topNavSpacing = document.querySelector('nav + div.da'); + if (topNavSpacing) { + topNavSpacing.remove(); } // Remove the "Pardon the interruption" popup. @@ -77,7 +83,7 @@ var observer = new MutationObserver(function(mutations){ mutations.forEach(function(){ makeReadable(); shrinkHeaderImages(); - }); + }); }); var config = {attributes: true};