This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const namedPlaces = [ | |
"Junk Junction", | |
"Haunted Hills", | |
"Pleasant Park", | |
"Lazy Links", | |
"Risky Reels", | |
"Wailing Woods", | |
"Tomato Temple", | |
"Lonely Lodge", | |
"Retail Row", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "FN Jumper", | |
"short_name": "FN Jumper", | |
"display": "minimal-ui", | |
"start_url": "/", | |
"theme_color": "#673ab6", | |
"background_color": "#111111", | |
"icons": [ | |
{ | |
"src": "icon-192.png", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.addEventListener('fetch', function (event) { | |
event.respondWith( | |
caches.match(event.request).then(function (response) { | |
return response || fetch(event.request); | |
}) | |
); | |
}); | |
self.addEventListener('install', function (e) { | |
e.waitUntil( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
navigator.serviceWorker && navigator.serviceWorker.register('./sw.js').then(function (registration) { | |
console.log('Excellent, registered with scope: ', registration.scope); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CLIENT_ID = 'YOUR CLIENT HERE'; | |
const CLIENT_SECRET = 'YOUR SECRET HERE'; | |
const express = require('express'); | |
const cors = require('cors') | |
const bodyParser = require('body-parser') | |
const { google } = require('googleapis'); | |
const app = express(); | |
const port = 8080; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Freshness", | |
"version": "1.0", | |
"description": "Fresh look at gmail", | |
"page_action": { | |
"default_icon": { | |
"16": "images/get_started16.png", | |
"32": "images/get_started32.png", | |
"48": "images/get_started48.png", | |
"128": "images/get_started128.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FRESHNESS_UI = 'freshness_ui'; | |
// add freeshness_ui class to body | |
var bodyEle = document.body; | |
bodyEle.classList.add(FRESHNESS_UI); | |
// toggle freshness ui class on the body element | |
function toggleFreshness() { | |
var status = bodyEle.classList.toggle(FRESHNESS_UI); | |
// console.log("toggle status", status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* hide footer */ | |
/* body.freshness_ui .aeG { | |
display: none; | |
} */ | |
/* make some space at bottom */ | |
body.freshness_ui .aeF { | |
margin-bottom: 50px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const utils = require("./utils.js"); | |
const myClient = require("./client.js"); | |
const WebSocket = require("ws"); | |
const chalk = require("chalk"); | |
const wss = new WebSocket.Server({ port: 8080, clientTracking: true }); | |
function clientConnected(client) { | |
var colorify = chalk.hex(client.color); |