From e48cccce4703c30a1ec3bf11c9bdc08a36ba8232 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 13 Jul 2022 21:27:02 +0200 Subject: [PATCH] Fix NYTimes (Cooking) --- changelog.txt | 1 + contentScript.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9719b846..ba86b7fd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add The Japan Times Fix ilTirreno.it & LaNuovaSardegna.it Fix Koelner Stadt-Anzeiger & Koelnische Rundschau +Fix NYTimes (Cooking) * v2.7.5.0 (2022-07-10) Add Architectural Digest (Conde Nast) diff --git a/contentScript.js b/contentScript.js index bdb8f655..d47efb6b 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3270,14 +3270,15 @@ else if (matchDomain('nytimes.com')) { let no_scroll = document.querySelectorAll('.nytc---modal-window---noScroll'); for (let elem of no_scroll) elem.classList.remove('nytc---modal-window---noScroll'); - let login = document.querySelector('.nytc---modal-window---isShown'); + let login = document.querySelector('div[class*="modal_modal-window-container"]:not([style="display:none;"])'); if (login) { let close_button = login.querySelector('span[aria-label="close"]'); if (!close_button) - login.classList.remove('nytc---modal-window---isShown'); + login.style = 'display:none;'; } } else { waitDOMElement('div[data-testid="inline-message"]', 'DIV', removeDOMElement, false); + waitDOMElement('div[id^="ad-"]', 'DIV', removeDOMElement, false); waitDOMElement('div.expanded-dock', 'DIV', removeDOMElement, false); csDoneOnce = true; }