forked from tastytea/userscripts
misskey_cw_toggle: update for Misskey 12.112
This commit is contained in:
parent
697eb57ab8
commit
edd90c4c9c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user