diff --git a/features/features.json b/features/features.json index b61378d1..4067299c 100644 --- a/features/features.json +++ b/features/features.json @@ -979,7 +979,8 @@ "https://scratch.mit.edu/users/rgantzos/" ], "file": "unbold-site-text", - "type": ["Website", "Theme"] + "type": ["Website", "Theme"], + "dynamic": true }, { "title": "Compact Navbar", diff --git a/features/unbold-site-text.js b/features/unbold-site-text.js index 6ac571a4..374beda5 100644 --- a/features/unbold-site-text.js +++ b/features/unbold-site-text.js @@ -1,9 +1,5 @@ -function unbold() { - if (window.location.href.includes("https://scratch.mit.edu/")) { - document.querySelectorAll("*").forEach(function (el) { - el.style.fontWeight = "normal"; - }); - window.setTimeout(unbold, 100); - } -} -unbold(); +var style = ScratchTools.styles.add("* { font-weight: normal !important; }"); + +ScratchTools.setDisable("unbold-site-text", function () { + style.remove(); +});