Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Welcome back</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
{
"name": "Chromepage",
"description": "Personalized override of Chrome New Tab page.",
"version": "1.0",
"manifest_version": 2,
"chrome_url_overrides": { "newtab": "index.html" }
}
@karenying
karenying / .prettierrc
Created September 23, 2020 13:13
prettier
{
"tabWidth": 2,
"singleQuote": true,
"jsxSingleQuote": true,
"semi": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"printWidth": 80
@karenying
karenying / git-aliases.json
Created September 23, 2020 13:12
git aliases
{
"ch": "checkout",
"b": "branch",
"ci": "commit -m",
"m": "master",
"chm": "checkout master",
"ad": "add .",
"pu": "push"
}
<!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">
"browser_action": {
"default_icon": "assets/icon.png",
"default_popup": "popup.html"
},
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;
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 });
});
});
"background": {
"scripts": ["js/background.js"],
"persistent": false
},
chrome.commands.onCommand.addListener(function (command) {
const direction = command.split('-')[1];
});