misskey_cw_toggle: update for Misskey 12.112

This commit is contained in:
tastytea 2022-07-13 01:31:33 +02:00
parent 697eb57ab8
commit edd90c4c9c
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 4 additions and 4 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.4
// @version 2022.07.13.1
// @author tastytea
// @copyright 2022, tastytea (https://tastytea.de/)
// @license GPL-3.0-only
@ -20,7 +20,7 @@ let counter = 0;
// Toggle the visibility of each status with CW.
function toggle() {
const root = document.getElementsByClassName("_block _isolated note")[0];
const root = document.getElementsByClassName("_block note")[0];
if (root === undefined) {
return;
}
@ -35,7 +35,7 @@ function toggle() {
// Add a “Toggle all CWs”-button.
function add_button() {
let root = document.getElementsByClassName("_block _isolated note")[0];
let root = document.getElementsByClassName("_block note")[0];
if (root === undefined) {
console.error("No suitable parent-element found.");
return;
@ -54,7 +54,7 @@ function add_button() {
}
function check() {
const root = document.getElementsByClassName("_block _isolated note")[0];
const root = document.getElementsByClassName("_block note")[0];
if (root === undefined) {
return;
}