Misskey CW toggle: Fix ID check
This commit is contained in:
parent
09885123b3
commit
0d63fc0600
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Misskey CW toggle
|
// @name Misskey CW toggle
|
||||||
// @description Adds a button to toggle the visibility of all notes with content warnings on note-pages.
|
// @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
|
// @author tastytea
|
||||||
// @copyright 2022, tastytea (https://tastytea.de/)
|
// @copyright 2022, tastytea (https://tastytea.de/)
|
||||||
// @license GPL-3.0-only
|
// @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 there is a “Show content” button, add our button, if we didn't do so before.
|
||||||
if (root.getElementsByClassName("cw").length > 0
|
if (root.getElementsByClassName("cw").length > 0
|
||||||
&& root.getElementById("global-cw-toggle") === null) {
|
&& document.getElementById("global-cw-toggle") === null) {
|
||||||
add_button();
|
add_button();
|
||||||
console.debug("Global CW toggle button added");
|
console.debug("Global CW toggle button added");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue