Fixed wikipedia redirect not working

This commit is contained in:
ManeraKai 2022-02-18 23:42:24 +03:00
parent bc438687cd
commit f92f9bc47c
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ window.browser = window.browser || window.chrome;
import commonHelper from './common.js'
const targets = /https:\/\/(www\.|)wikipedia\.org/
const targets = /^https?:\/\/.*wikipedia\.org\//
let redirects = {
"wikiless": {
@ -62,7 +62,7 @@ function setWikilessCustomRedirects(val) {
function isWikipedia(url, initiator) {
if (disable) return false;
return url.host.match(targets);
return targets.test(url.href);
}
function redirect(url) {