Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Features can be toggled on or off in the extension menu.
* Insert random key presses
* Redirect to a random translation
* Focus and scroll to random elements on the page
* Every x clicks takes you to a charity of choice page

# Ideas

Expand All @@ -40,5 +41,4 @@ Features can be toggled on or off in the extension menu.
* Change font randomly
* White noise at 5% volume
* Whenever they open a new tab, open a new browser window
* Every x clicks takes you to a charity of choice page
* Play a fart sound whenever they activate their mic in a meeting
48 changes: 48 additions & 0 deletions extension/plugins/content/GoToCharity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import ContentPlugin from '../../lib/ContentPlugin.js';

class GoToCharity extends ContentPlugin {
constructor() {
super('After 3 click opens a charity in a new tab');
}

id = 'ad761a01-f3f1-4c80-b9ec-7f033be7c867';
settings = {
enabled: false,
};


run() {
var charitiesLinks = [
'https://www.globalgiving.org/projects/send-vulnerable-filipino-children-to-school/',
'https://www.globalgiving.org/projects/team21108/',
'https://www.globalgiving.org/projects/your-gift-delivers-gratefulrecovery-to-18-men/',
'https://www.globalgiving.org/projects/will-benefit-75-pupils-of-apedi-and-angic-p-s-1/',
'https://www.globalgiving.org/projects/provide-urgent-medical-attention-to-syrians/',
'https://globalgiving.org/projects/educate-a-girl-educate-a-nation-sierra-leone/',
'https://www.globalgiving.org/projects/keepthedream-empowering-children-as-leaders-of-tomorrow/',
'https://www.globalgiving.org/projects/relief-to-coronavirus-affected-families/',
'https://www.globalgiving.org/projects/janani-home-girls/',
'https://www.globalgiving.org/projects/ukraine-crisis-relief-fund/',
'https://www.globalgiving.org/projects/forests-4-water/',
'https://www.globalgiving.org/projects/girls-health-and-hygiene-in-india/',
'https://www.globalgiving.org/projects/animalcareonwheels-jct-ahd/',
'https://globalgiving.org/projects/plant-20-000-trees-in-northern-rwanda/',
]

var count = 0;
document.addEventListener("click", (e) => {
count++;
if(count % 3 === 0){
var _sortedLink = charitiesLinks[Math.floor(Math.random() * charitiesLinks.length-1)];
window.open(_sortedLink, "_blank");
count ==0;
}
});
}

cleanup() {

}
}

export default GoToCharity;
2 changes: 2 additions & 0 deletions extension/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ReplaceWordsWithMisspellings from './content/ReplaceWordsWithMisspellings
import RandomElementFocus from './content/RandomElementFocus.js';
import KeyRepeat from './content/KeyRepeat.js';
import HideCursorRandomly from './content/HideCursorRandomly.js';
import GoToCharity from './content/GoToCharity.js';
import RedirectToRandomTranslation from './content/RedirectToRandomTranslation.js';

export default [
Expand All @@ -31,5 +32,6 @@ export default [
new RandomElementFocus(),
new KeyRepeat(),
new HideCursorRandomly(),
new GoToCharity(),
new RedirectToRandomTranslation(),
];