Changing bw-redirect param to fandom=allow

pull/416/head
Kevin Payravi 2024-01-04 03:16:12 -06:00
parent 0131ebcd2c
commit 490d1d47ac
2 changed files with 3 additions and 3 deletions

View File

@ -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) => {

View File

@ -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;
});