From 0d63fc06002b800625b8ab5020724969d84f42c8 Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 17 May 2022 01:30:32 +0200 Subject: [PATCH] Misskey CW toggle: Fix ID check --- fediverse/misskey_cw_toggle.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fediverse/misskey_cw_toggle.user.js b/fediverse/misskey_cw_toggle.user.js index 11a8ad3..8d2fd5b 100644 --- a/fediverse/misskey_cw_toggle.user.js +++ b/fediverse/misskey_cw_toggle.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Misskey CW toggle // @description Adds a button to toggle the visibility of all notes with content warnings on note-pages. -// @version 2022.05.17.2 +// @version 2022.05.17.3 // @author tastytea // @copyright 2022, tastytea (https://tastytea.de/) // @license GPL-3.0-only @@ -61,7 +61,7 @@ function check() { // If there is a “Show content” button, add our button, if we didn't do so before. if (root.getElementsByClassName("cw").length > 0 - && root.getElementById("global-cw-toggle") === null) { + && document.getElementById("global-cw-toggle") === null) { add_button(); console.debug("Global CW toggle button added"); }