Skip to content

Instantly share code, notes, and snippets.

@edjw
Created December 19, 2018 10:11
Show Gist options
  • Save edjw/f82e24f1f0064ec980fc486499150ca0 to your computer and use it in GitHub Desktop.
Save edjw/f82e24f1f0064ec980fc486499150ca0 to your computer and use it in GitHub Desktop.
When you have lots of calendars in Google Calendar, it can be overwhelming and difficult to see only your events. Paste this script into the Console of your browser to toggle only seeing certain calendars. I might make a browser extension to do this
var calendars = Array.from(document.getElementsByClassName("NI2kfb qZvm2d-ibnC6b-bN97Pc DX3x9d"));
// ** RENAME THE CALENDARS IN THIS SECTION **
var calendarsToSee = ["NAME OF CALENDAR TO ALWAYS SEE 1", "NAME OF CALENDAR TO ALWAYS SEE 2"];
var calendarsToIgnore = ["Tasks", "Reminders"];
calendars.forEach(calendar => {
if (calendarsToSee.includes(calendar.innerText) == false && calendarsToIgnore.includes(calendar.innerText) == false) {
calendar.click();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment