Skip to content

Instantly share code, notes, and snippets.

"icons": {
"16": "assets/icon.png",
"48": "assets/icon.png",
"128": "assets/icon.png"
},
"permissions": ["https://calendar.google.com/*"],
const container = document.getElementsByClassName('rbGOge SeRypc');
if (container) {
const containerChildren = container[0].childNodes;
const leftArrow = containerChildren[1];
const rightArrow = containerChildren[2];
}
"content_scripts": [
{
"matches": ["https://calendar.google.com/*"],
"js": ["js/contentScript.js"]
}
],
"commands": {
"navigate-left": {
"suggested_key": {
"default": "Alt+Left",
"mac": "Alt+Left"
},
"description": "Navigate Left"
},
"navigate-right": {
"suggested_key": {
chrome.commands.onCommand.addListener(function (command) {
const direction = command.split('-')[1];
});
"background": {
"scripts": ["js/background.js"],
"persistent": false
},
chrome.commands.onCommand.addListener(function (command) {
const direction = command.split('-')[1];
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
chrome.tabs.sendMessage(tabs[0].id, { direction });
});
});
const container = document.getElementsByClassName('rbGOge SeRypc');
if (container) {
const containerChildren = container[0].childNodes;
const leftArrow = containerChildren[1];
const rightArrow = containerChildren[2];
chrome.runtime.onMessage.addListener(function (message) {
const { direction } = message;
"browser_action": {
"default_icon": "assets/icon.png",
"default_popup": "popup.html"
},
<!DOCTYPE html>
<html>
<head>
<title>Google Calendar Naviation Shortcuts</title>
<link rel="stylesheet" href="styles/popup.css" />
</head>
<body>
<div class="popup-container">
<div class="header">