Misskey CW toggle: Fix ID check

This commit is contained in:
tastytea 2022-05-17 01:30:32 +02:00
parent 09885123b3
commit 0d63fc0600
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 2 deletions

View File

@ -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");
}