diff --git a/features/hide-advertisements/data.json b/features/hide-advertisements/data.json index cd4ee4c4..1b3e3192 100644 --- a/features/hide-advertisements/data.json +++ b/features/hide-advertisements/data.json @@ -17,6 +17,13 @@ { "file": "three.js", "runOn": "/studios/*" }, { "file": "two.js", "runOn": "/users/*" } ], - "options": [{ "id": "colorComment", "name": "Highlight Comments", "type": 1 }], + "options": [ + { "id": "colorComment", "name": "Highlight Comments", "type": 1 }, + { + "id": "dontHideStudioComments", + "name": "Don't Hide Studio Comments", + "type": 1 + } + ], "similar": ["important-messages", "block-messages"] } diff --git a/features/hide-advertisements/style.css b/features/hide-advertisements/style.css index e3627493..b207372c 100644 --- a/features/hide-advertisements/style.css +++ b/features/hide-advertisements/style.css @@ -1,4 +1,4 @@ -body.colorComment .scratchtoolsAd .comment-bubble, .scratchtoolsAd .comment-bubble::before { +body.colorComment .scratchtoolsAd .comment-bubble, body.colorComment .scratchtoolsAd .comment-bubble::before { background-color: #eccedf !important; border: 1px solid #ff6680; } @@ -9,6 +9,6 @@ body.colorComment .scratchtoolsAd .comment-bubble:before { background-color: #eccedf !important; } -body.hideComment .scratchtoolsAd { +body.hideComment:not(.dontHideStudioComments) .scratchtoolsAd { display: none; } diff --git a/features/hide-advertisements/three.js b/features/hide-advertisements/three.js index bb203a3c..fceabbeb 100644 --- a/features/hide-advertisements/three.js +++ b/features/hide-advertisements/three.js @@ -6,6 +6,10 @@ if (ScratchTools.Storage.colorComment) { document.body.classList.add("hideComment"); } +if (ScratchTools.Storage.dontHideStudioComments) { + document.body.classList.add("dontHideStudioComments") +} + var hideAds = new Feature({ id: "hide-advertisements" }); hideAds.settings.addEventListener("changed", function ({key: name, value}) { if (name === "colorComment") { @@ -16,6 +20,12 @@ hideAds.settings.addEventListener("changed", function ({key: name, value}) { document.body.classList.remove("colorComment"); document.body.classList.add("hideComment"); } + } else if (name === "dontHideStudioComments") { + if (value) { + document.body.classList.add("dontHideStudioComments") + } else { + document.body.classList.remove("dontHideStudioComments") + } } });