This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extensionName": { | ||
"message": "Brainly Blocker by nitro." | ||
}, | ||
"extensionDescription": { | ||
"message": "An extension that blocks some of brainly's ads and other stuff." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extensionName": { | ||
"message": "Brainly Blocker por nitro." | ||
}, | ||
"extensionDescription": { | ||
"message": "Uma extensão que bloqueia alguns dos anúncios do brainly e outras coisas." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
// I swear. I tried every single way to listen to when local storage is changed in the same window but it doesn't work. This is my last idea, I tried. | ||
|
||
// Set these to a REALLY (I mean it) far timestamp so it doesn't annoy us with popups | ||
localStorage.setItem('registration-toplayer/expires', 2147483647000); | ||
localStorage.setItem('offer-modal/timestamp', 2147483647000); | ||
localStorage.setItem('welcome-payment-form/timestamp', 2147483647000); | ||
|
||
// Loop through every key | ||
Object.keys(localStorage).forEach((key) => { | ||
// Remove every entry that starts with "flexible-tunnel", that's part of the ads | ||
if (key.startsWith('flexible-funnel')) { | ||
localStorage.removeItem(key); | ||
} | ||
// Set these to a REALLY (I mean it) far timestamp so it doesn't annoy us with popups | ||
if (key === 'registration-toplayer/expires' || key === 'offer-modal/timestamp' || key === 'welcome-payment-form/timestamp') { | ||
localStorage.setItem(key, 2147483647000); | ||
} | ||
}); | ||
|
||
// Remove annoying banner | ||
const banner = document.getElementsByClassName('js-react-bottom-banner')[0]; | ||
if (banner) banner.parentNode.removeChild(banner); | ||
const pathName = window.location.pathname; | ||
if (pathName.startsWith('/tarefa') || pathName.startsWith('/question')) { | ||
const banner = document.getElementsByClassName('js-react-bottom-banner')[0]; | ||
if (banner) banner.parentNode.removeChild(banner); | ||
} |