From 2c3b9ee328aa63aadb1ba6f43f319eea016bf065 Mon Sep 17 00:00:00 2001 From: rgantzos <86856959+rgantzos@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:53:21 -0700 Subject: [PATCH 1/3] Update features.json --- features/features.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/features.json b/features/features.json index caa770ce..27c76b0c 100644 --- a/features/features.json +++ b/features/features.json @@ -1,4 +1,9 @@ [ + { + "version": 2, + "id": "fix-gifs", + "versionAdded": "v4.0.0" + }, { "version": 2, "id": "outline-shape-options", From 43cdd71bbc5874f9981edbfebb46cf6c9ad8bb3d Mon Sep 17 00:00:00 2001 From: rgantzos <86856959+rgantzos@users.noreply.github.com> Date: Sat, 30 Nov 2024 09:39:42 -0800 Subject: [PATCH 2/3] Add option to not hide advertisements in studio comments --- features/hide-advertisements/data.json | 9 ++++++++- features/hide-advertisements/style.css | 4 ++-- features/hide-advertisements/three.js | 10 ++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) 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") + } } }); From 0ad6f43abec5a652a1a63abeb0e8320f8bb647fc Mon Sep 17 00:00:00 2001 From: rgantzos <86856959+rgantzos@users.noreply.github.com> Date: Sat, 30 Nov 2024 09:40:21 -0800 Subject: [PATCH 3/3] Revert "Update features.json" This reverts commit 2c3b9ee328aa63aadb1ba6f43f319eea016bf065. --- features/features.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/features/features.json b/features/features.json index 27c76b0c..caa770ce 100644 --- a/features/features.json +++ b/features/features.json @@ -1,9 +1,4 @@ [ - { - "version": 2, - "id": "fix-gifs", - "versionAdded": "v4.0.0" - }, { "version": 2, "id": "outline-shape-options",