2024-01-04 08:36:26 +00:00
|
|
|
// Hide Indie Wiki Buddy promo banner
|
|
|
|
const bwTopBanners = document.querySelectorAll('.bw-top-banner');
|
|
|
|
bwTopBanners.forEach((banner) => {
|
2024-02-27 09:43:55 +00:00
|
|
|
if (banner.innerText.includes('affiliated browser extension')) {
|
|
|
|
banner.style.display = 'none';
|
|
|
|
}
|
2024-01-04 09:12:31 +00:00
|
|
|
});
|
|
|
|
|
2024-01-04 09:16:12 +00:00
|
|
|
// Append "fandom allow" query param to Fandom links
|
2024-01-04 09:12:31 +00:00
|
|
|
// 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);
|
2024-01-04 09:16:12 +00:00
|
|
|
url.searchParams.append('fandom', 'allow');
|
2024-02-27 09:43:55 +00:00
|
|
|
link.href = url;
|
2024-01-04 08:36:26 +00:00
|
|
|
});
|