Fixed wikia not redirecting properly https://github.com/libredirect/libredirect/issues/611#issuecomment-1414939502
This commit is contained in:
parent
ce742b28a0
commit
3c11223d6a
|
@ -345,10 +345,9 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||||
}
|
}
|
||||||
return randomInstance
|
return randomInstance
|
||||||
case "breezeWiki":
|
case "breezeWiki":
|
||||||
let wiki,
|
let wiki, urlpath = ""
|
||||||
urlpath = ""
|
if (url.hostname.match(/^[a-zA-Z0-9-]+\.(?:fandom|wikia)\.com/)) {
|
||||||
if (url.hostname.match(/^[a-zA-Z0-9-]+\.fandom\.com/)) {
|
wiki = url.hostname.match(/^[a-zA-Z0-9-]+(?=\.(?:fandom|wikia)\.com)/)
|
||||||
wiki = url.hostname.match(/^[a-zA-Z0-9-]+(?=\.fandom\.com)/)
|
|
||||||
if (wiki == "www" || !wiki) wiki = ""
|
if (wiki == "www" || !wiki) wiki = ""
|
||||||
else wiki = `/${wiki}`;
|
else wiki = `/${wiki}`;
|
||||||
urlpath = url.pathname
|
urlpath = url.pathname
|
||||||
|
|
Loading…
Reference in New Issue