diff options
author | Jesús <heckyel@hyperbola.info> | 2020-01-09 12:06:53 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-01-09 12:06:53 -0500 |
commit | cbfcdff8445e1cf947bd2aebc94178274a0ca50c (patch) | |
tree | 13d86765f717e9173dd8a06baece6766739b4529 /scripts-greasemonkey/twitter_to_nitter.user.js | |
parent | 364e32fe69e4fae9a77e2da7da02669d5eb42787 (diff) | |
download | book-cbfcdff8445e1cf947bd2aebc94178274a0ca50c.tar.lz book-cbfcdff8445e1cf947bd2aebc94178274a0ca50c.tar.xz book-cbfcdff8445e1cf947bd2aebc94178274a0ca50c.zip |
twitter_to_nitter: fix regex
Diffstat (limited to 'scripts-greasemonkey/twitter_to_nitter.user.js')
-rw-r--r-- | scripts-greasemonkey/twitter_to_nitter.user.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts-greasemonkey/twitter_to_nitter.user.js b/scripts-greasemonkey/twitter_to_nitter.user.js index fb994f9..bf3c657 100644 --- a/scripts-greasemonkey/twitter_to_nitter.user.js +++ b/scripts-greasemonkey/twitter_to_nitter.user.js @@ -29,7 +29,7 @@ let consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1p function rewriteLinks() { for (let i = 0; i < document.links.length; i++) { let elem = document.links[i]; - if (elem.href.match(/http(s|)\:\/\/(mobile[.]|www[.]|)(twitter[.]com)\/([^&#]+.*$)/i)) { + if (elem.href.match(/http(s|):\/\/(mobile[.]|www[.]|)twitter[.]com\/(#!\/)?(.*$)/i)) { elem.href='https://' + instance + '/' + RegExp.$4; } } |