├── img └── icons │ └── icon_256.png ├── README.md ├── manifest.json └── js └── content_script.js /img/icons/icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robin-drexler/Google-Calendar-Guests-Can-Modify-Event-By-Default/HEAD/img/icons/icon_256.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Google-Calendar-Guests-Can-Modify-Event-By-Default 2 | 3 | _**PLEASE NOTE:** This extension is now obsolete, as the new calendar now supports setting this as default. Simply edit "Default Guest Permissions" in Google Calendar Settings. :)_ 4 | 5 | ![How to enable](https://user-images.githubusercontent.com/474248/31768140-4ad2bb1a-b4ce-11e7-823b-d7b7c1885b50.png) 6 | 7 | --- 8 | 9 | Chrome extension that enables 'Guests can modify event' setting for google calendar by default, when creating a new event. 10 | 11 | You can install it from [the Chrome Webstore](https://chrome.google.com/webstore/detail/google-calendar-guests-mo/hjhicmeghjagaicbkmhmbbnibhbkcfdb). 12 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Google Calendar Guests Modify Event Default", 3 | "version": "0.3", 4 | "icons": { 5 | "256": "/img/icons/icon_256.png" 6 | }, 7 | 8 | "description": "Enables 'Guests can modify event' setting for google calendar by default, when creating a new event.", 9 | 10 | "content_scripts": [ 11 | { 12 | "matches": [ 13 | "https://calendar.google.com/*", 14 | "https://www.google.com/calendar/*" 15 | ], 16 | "js": [ 17 | "/js/content_script.js" 18 | ] 19 | } 20 | ], 21 | 22 | "manifest_version": 2 23 | } 24 | -------------------------------------------------------------------------------- /js/content_script.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | function onLoad() { 4 | // checkbox id is something like :31guests-modify 5 | // the number does actually change 6 | // it's not even a valid selector ¯\_(ツ)_/¯ 7 | var modifyEventCheckbox = document.querySelector('input[id$=guests-modify]'); 8 | var clickEvent = new MouseEvent("click", { 9 | bubbles: true, 10 | cancelable: true, 11 | view: window 12 | }); 13 | 14 | if (modifyEventCheckbox && !modifyEventCheckbox.checked) { 15 | // activate the checkbox by mimicing click 16 | // needed so the checkbox stays checked, after switching tabs to e.g. to "find a time" 17 | modifyEventCheckbox.dispatchEvent(clickEvent) 18 | } 19 | } 20 | 21 | window.addEventListener('hashchange', function() { 22 | // delay execution, because DOM might not be ready immediately 23 | // after event was fired 24 | window.setTimeout(onLoad, 250); 25 | }); 26 | onLoad(); 27 | })(); 28 | --------------------------------------------------------------------------------