From aa407c7064f4a0c3c29ac28213b90441602dae2e Mon Sep 17 00:00:00 2001 From: wanhose Date: Thu, 29 Jul 2021 10:55:19 +0200 Subject: [PATCH] feat(scripts): add forbidden classlist property to content scripts fix method --- scripts/content.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/content.js b/scripts/content.js index 6e7e4b2..6db05ec 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -44,10 +44,12 @@ let selectorsFromNetwork = []; */ const fix = () => { - const html = document.documentElement; const body = document.body; + const classListToRemove = ["ta-cc-modal-open"]; const facebook = document.getElementsByClassName("_31e")[0]; + const html = document.documentElement; + if (body) body.classList.remove(...classListToRemove); if (body) body.style.setProperty("overflow-y", "unset", "important"); if (facebook) facebook.style.setProperty("position", "unset", "important"); if (html) html.style.setProperty("overflow-y", "unset", "important");