Misskey CW toggle: -const +let
This commit is contained in:
parent
e9b803c50c
commit
09885123b3
|
@ -35,8 +35,7 @@ function toggle() {
|
||||||
|
|
||||||
// Add a “Toggle all CWs”-button.
|
// Add a “Toggle all CWs”-button.
|
||||||
function add_button() {
|
function add_button() {
|
||||||
// If there is no element named “column-1”, use the footer.
|
let root = document.getElementsByClassName("_block _isolated note")[0];
|
||||||
const root = document.getElementsByClassName("_block _isolated note")[0];
|
|
||||||
if (root === undefined) {
|
if (root === undefined) {
|
||||||
console.error("No suitable parent-element found.");
|
console.error("No suitable parent-element found.");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue