Update for current Pleroma
This commit is contained in:
parent
706a49885f
commit
9bf6450d47
|
@ -1,9 +1,9 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Pleroma CW toggle
|
// @name Pleroma CW toggle
|
||||||
// @description Adds a button to toggle the visibility of all statuses with content warnings on status-pages, profile-pages and timelines.
|
// @description Adds a button to toggle the visibility of all statuses with content warnings on status-pages, profile-pages and timelines.
|
||||||
// @version 2019.06.25.2
|
// @version 2022.02.19.2
|
||||||
// @author tastytea
|
// @author tastytea
|
||||||
// @copyright 2019, tastytea (https://tastytea.de/)
|
// @copyright 2019, 2022, tastytea (https://tastytea.de/)
|
||||||
// @license GPL-3.0-only
|
// @license GPL-3.0-only
|
||||||
// @namespace tastytea.de
|
// @namespace tastytea.de
|
||||||
// @homepageURL https://schlomp.space/tastytea/userscripts
|
// @homepageURL https://schlomp.space/tastytea/userscripts
|
||||||
|
@ -106,9 +106,14 @@ function check()
|
||||||
parent = root[0].parentElement;
|
parent = root[0].parentElement;
|
||||||
}
|
}
|
||||||
// if root element and a status was found, disable interval and add button.
|
// if root element and a status was found, disable interval and add button.
|
||||||
if (root.length !== 0
|
if (root.length !== 0)
|
||||||
&& parent.getElementsByClassName("status-content").length > 0)
|
|
||||||
{
|
{
|
||||||
|
if (!parent.getElementsByClassName("StatusContent").length > 0
|
||||||
|
&& !parent.getElementsByClassName("status-content").length > 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_static)
|
if (is_static)
|
||||||
{
|
{
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
|
|
Loading…
Reference in New Issue