├── screenshot.png
├── icons
├── icon16.png
├── icon48.png
└── icon128.png
├── content.js
├── manifest.json
├── README.md
├── Greta-Van-10bis.user.js
└── LICENSE
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dewbjorn/Greta-Van-10bis/HEAD/screenshot.png
--------------------------------------------------------------------------------
/icons/icon16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dewbjorn/Greta-Van-10bis/HEAD/icons/icon16.png
--------------------------------------------------------------------------------
/icons/icon48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dewbjorn/Greta-Van-10bis/HEAD/icons/icon48.png
--------------------------------------------------------------------------------
/icons/icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dewbjorn/Greta-Van-10bis/HEAD/icons/icon128.png
--------------------------------------------------------------------------------
/content.js:
--------------------------------------------------------------------------------
1 | const modalsElement = document.querySelector('#modals');
2 |
3 | const config = { childList: true, subtree: true };
4 |
5 | const callback = mutationsList => {
6 | for (let mutation of mutationsList) {
7 | const cutleryCheckbox = mutation.target.querySelector('#dont_want_cutlery');
8 |
9 | if (cutleryCheckbox && !cutleryCheckbox.checked) {
10 | cutleryCheckbox.click();
11 | }
12 | }
13 | }
14 |
15 | const observer = new MutationObserver(callback);
16 |
17 | observer.observe(modalsElement, config);
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Greta Van 10bis",
3 | "version": "1.1.1",
4 | "manifest_version": 2,
5 | "description": "Disable one time use Plastic cutlery on 10bis",
6 | "icons": {
7 | "16": "icons/icon16.png",
8 | "48": "icons/icon48.png",
9 | "128": "icons/icon128.png"
10 | },
11 | "browser_action": {
12 | "default_icon": "icons/icon16.png",
13 | "default_title": "Save the planet!"
14 | },
15 | "permissions": [
16 | "*://*.10bis.co.il/*",
17 | "*://10bis.co.il/*"
18 | ],
19 | "content_scripts": [
20 | {
21 | "matches": [
22 | "*://*.10bis.co.il/*",
23 | "*://10bis.co.il/*"
24 | ],
25 | "js": [
26 | "content.js"
27 | ]
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Greta Van 10bis
2 | A Chrome & Firefox extension that automatically opts-out from ordering Plastic cutlery on 10bis.co.il.
3 |
4 | Extension URLs:
5 | [Google Chrome](https://chrome.google.com/webstore/detail/greta-van-10bis/feomodgjijapbcblcgdjkjjkgjplmhpa)
6 | |
7 | [Fireox](https://addons.mozilla.org/en-US/firefox/addon/greta-van-10bis)
8 | |
9 | [Greasemonkey Userscript](https://github.com/tkore/Greta-Van-10bis/raw/master/Greta-Van-10bis.user.js)
10 |
11 |
12 | ## What's with the name?
13 | [Greta Thunberg](https://en.wikipedia.org/wiki/Greta_Thunberg) is a Swedish environmental activist on climate change whose campaigning has gained international recognition.
14 |
15 | That, along with the fact that [Greta Van Fleet](https://en.wikipedia.org/wiki/Greta_Van_Fleet) is an awesome band heavily influenced by Led Zeppelin which you should definitely check out if you're a rock fan - should give you an idea about why I chose this peculiar name. :)
16 |
17 |
18 |
19 |
20 |
21 |