Changing bw-redirect param to fandom=allow
parent
0131ebcd2c
commit
490d1d47ac
|
@ -160,7 +160,7 @@ function redirectToBreezeWiki(storage, tabId, url) {
|
|||
}
|
||||
}
|
||||
|
||||
if (url.includes('fandom.com/wiki/') && !url.includes('bw-redirect=no')) {
|
||||
if (url.includes('fandom.com/wiki/') && !url.includes('fandom=allow')) {
|
||||
if (!(storage.breezewikiHost ?? null)) {
|
||||
fetch('https://bw.getindie.wiki/instances.json')
|
||||
.then((response) => {
|
||||
|
|
|
@ -6,11 +6,11 @@ bwTopBanners.forEach((banner) => {
|
|||
}
|
||||
});
|
||||
|
||||
// Append bw-redirect query param to Fandom links
|
||||
// Append "fandom allow" query param to Fandom links
|
||||
// This allows users to click a Fandom link without being redirected back to BW
|
||||
const bwFandomLinks = document.querySelectorAll('a[href*=".fandom.com"]');
|
||||
bwFandomLinks.forEach((link) => {
|
||||
const url = new URL(link);
|
||||
url.searchParams.append('bw-redirect', 'no');
|
||||
url.searchParams.append('fandom', 'allow');
|
||||
link.href = url;
|
||||
});
|
Loading…
Reference in New Issue