pleroma_cw_toggle: Fixed regex, everything was detected as timeline.

This commit is contained in:
tastytea 2019-06-12 22:20:04 +02:00
parent 50c53be59b
commit 1712e8c2f9
Signed by untrusted user: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @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.
// @version 2019.06.12.2
// @version 2019.06.12.3
// @author tastytea
// @copyright 2019, tastytea (https://tastytea.de/)
// @license GPL-3.0-only
@ -69,7 +69,7 @@ function add_button(parent)
function check()
{
const re = new RegExp(
'(/main/(friends|public|all)|/users/[^/]+(/(mentions|dms)))?#?$');
'(/main/(friends|public|all)|/users/[^/]+(/(mentions|dms))?)#?$');
const is_timeline = re.test(window.location.href);
if (!is_timeline) // If we are on a timeline, don't stop checking.