Skip to content

Instantly share code, notes, and snippets.

View jpigla's full-sized avatar
🌤️
doing something

Jan-Philipp Igla jpigla

🌤️
doing something
View GitHub Profile
const HALF_OPEN_WIDTH = 80
// this value starts as -1
// and is updated when the sidebar is updated the first time
// this is the width to which the sidebar will resize when it is fully open
let SIDEBAR_WIDTH = -1
// state enumerator, can only be closed, half-closed, and open
const state = {
closed: 0,
halfClosed: 1,
const puppeteer = require('puppeteer');
const devices = require('puppeteer/DeviceDescriptors');
var fs = require('fs');
const mergeImg = require('merge-img');
const ampToolboxCacheUrl = require('amp-toolbox-cache-url').createCacheUrl;
const Good3G = {
'offline': false,
'downloadThroughput': 1.5 * 1024 * 1024 / 8,
'uploadThroughput': 750 * 1024 / 8,