diff --git a/features/features.json b/features/features.json index f3b5ed09..f0874327 100644 --- a/features/features.json +++ b/features/features.json @@ -204,14 +204,8 @@ ] }, { - "title": "Highlight Unanswered Forum Topics", - "description": "Adds a blue highlight to topics in the forums that have no replies.", - "credits": ["rgantzos"], - "urls": ["https://scratch.mit.edu/users/rgantzos/"], - "file": "highlight-unanswered", - "type": ["Website"], - "tags": ["New", "Recommended"], - "dynamic": true + "id": "highlight-unanswered", + "version": 2 }, { "title": "Hide Project Tags", diff --git a/features/highlight-unanswered/data.json b/features/highlight-unanswered/data.json new file mode 100644 index 00000000..422489e4 --- /dev/null +++ b/features/highlight-unanswered/data.json @@ -0,0 +1,10 @@ +{ + "title": "Highlight Unanswered Forum Topics", + "description": "Adds a blue highlight to topics in the forums that have no replies.", + "credits": [ + { "username": "rgantzos", "url": "https://scratch.mit.edu/users/rgantzos/" } + ], + "type": ["Website"], + "tags": ["New", "Recommended"], + "scripts": [{ "file": "script.js", "runOn": "/discuss/*" }] +} \ No newline at end of file diff --git a/features/highlight-unanswered.js b/features/highlight-unanswered/script.js similarity index 99% rename from features/highlight-unanswered.js rename to features/highlight-unanswered/script.js index ec9b231f..c96183f8 100644 --- a/features/highlight-unanswered.js +++ b/features/highlight-unanswered/script.js @@ -11,9 +11,8 @@ if ( } }); } - ScratchTools.setDisable("highlight-unanswered", function () { document.querySelectorAll("tbody > tr").forEach(function (el) { el.style.backgroundColor = null; }); -}); +}); \ No newline at end of file