twitter_to_nitter: fix regex
This commit is contained in:
parent
364e32fe69
commit
cbfcdff844
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user