This commit is contained in:
ManeraKai 2023-02-03 10:30:19 +03:00
parent ce742b28a0
commit 3c11223d6a
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 3 additions and 4 deletions

View File

@ -345,10 +345,9 @@ function redirect(url, type, initiator, forceRedirection) {
}
return randomInstance
case "breezeWiki":
let wiki,
urlpath = ""
if (url.hostname.match(/^[a-zA-Z0-9-]+\.fandom\.com/)) {
wiki = url.hostname.match(/^[a-zA-Z0-9-]+(?=\.fandom\.com)/)
let wiki, urlpath = ""
if (url.hostname.match(/^[a-zA-Z0-9-]+\.(?:fandom|wikia)\.com/)) {
wiki = url.hostname.match(/^[a-zA-Z0-9-]+(?=\.(?:fandom|wikia)\.com)/)
if (wiki == "www" || !wiki) wiki = ""
else wiki = `/${wiki}`;
urlpath = url.pathname