完成形
https://github.com/napolab/cloudflare-workers-playground
javascript:(function () { | |
var active; | |
var magnifier; | |
var config = { | |
scale: 75, | |
size: 160, | |
image: | |
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAOtMSURBVHgBrL2JmuS4zQQYyK/e/42b2EkRcUDVY/vf3bKnK0spkSCOwMFDdep0F9D9z3/8jfjvfe379/nnn8/8ffqfazXfNY7a+V77XsXz/fk2gn9+8+o//3yb+efSP9fm7+jj+89zb+G2Md9/H2A/35/nmtqfNqfvnr+zv2Yb/9x/YpykjW3c5jyuZzxFOmYMddvxdQQN7/H85fr7+3m+a9N3ya+hA+r7PG1eWmroJy+f+5//7ee+f3+fAeV0QgY1fOiQpfofum9nz7OHn3vz6bY/8v/S+X2W8unh29CdfFMfKY/gbS/5//MF9eBLy/eGD/XYcmGf5PXhtTN8Hxm7r9Ad9pn2Eboj+SPtZNp7Pv/zz+efcZwWzzrsY/X5Hcsaw9D7JbggmtIeT8hC16RD2LpyIJ6fe+n5/WP1ug8UB3a16FGs5pejI50KNMTRqJ4nxuKevz/Tfl0lGF1/nqsYxHQ7mvXPr88/9zbBokJF2ko49J1/tLhG4fkbYRjdVOPnMvzXvf/5xDYevRrg4p2PUpzhHHlgnpAy0TAGUexsjKLMaff7vX42P9hvVQ1wmGgaVdOcef3Lqw9u3xLkUEY6SXNodX1GBqAy9+0XIbfRmOJjyLF/CT+3WdLesAH2lVd9an7jkZdQ76UHNbI+//yvKq+HBoweSZ/68orGGMwaJ1OPo/oa42DT0+B95ozkpt1nvE1lhMVMhQs7CF0cxbnjnRs+dXXz80+/f1IGo4hz+9MV++4BSOp5fVq8fcBhQ |
const navigatorErrorMessage = 'Could not find `userAgent` or `userAgentData` window.navigator properties to set `os`, `browser` and `version`' | |
const removeExcessMozillaAndVersion = /^mozilla\/\d\.\d\W/ | |
const browserPattern = /(\w+)\/(\d+\.\d+(?:\.\d+)?(?:\.\d+)?)/g | |
const engineAndVersionPattern = /^(ver|cri|gec)/ | |
const userAgentData = window.navigator.userAgentData | |
const userAgent = window.navigator.userAgent | |
const unknown = 'Unknown' | |
const empty = '' | |
const brandList = ['chrome', 'opera', 'safari', 'edge', 'firefox'] |
This gist uses the idf-release/v4.2 release of arduino-esp32, can be found here: https://github.com/espressif/arduino-esp32/tree/idf-release/v4.2
let { AceBase } = require('acebase'); | |
// Database contains all IndexedDB database logic for our web app. | |
class Database { | |
// The constructor opens/creates the database titled 'my_db_(namespace)' | |
constructor(namespace) { | |
// Use AceBase.WithIndexedDB to create an AceBase instance | |
// that uses IndexedDB to store its data | |
let name = Database.dbName(namespace); |
#include "Touch.h" | |
#if defined(_USING_HID) | |
#define CONTACT_COUNT_MAXIMUM 10 | |
#define REPORTID_TOUCH 0x04 | |
#define LSB(v) ((v >> 8) & 0xff) | |
#define MSB(v) (v & 0xff) |
<!doctype html> | |
<html> | |
<title>Flatten.js, General SVG Flattener</title> | |
<head> | |
<script> | |
/* | |
Random path and shape generator, flattener test base: https://jsfiddle.net/fjm9423q/embedded/result/ | |
Basic usage example: https://jsfiddle.net/nrjvmqur/embedded/result/ |
function KickWd(){ | |
if(!BTN1.read())E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,5000); // 5 secs | |
E.enableWatchdog(20, false); // 20 secs | |
E.kickWatchdog(); | |
/* | |
// MIT License (c) 2020 fanoush https://github.com/fanoush | |
// see full license text at https://choosealicense.com/licenses/mit/ | |
var SPI2 = E.compiledC(` |
// https://gist.github.com/jniac/1f1b8e57dbb320138af00680c090f94e | |
const parser = new DOMParser() | |
const html = (strings, ...inserts) => { | |
if (typeof strings === 'string') { | |
// html is used as a regular function, eg: | |
// html(`<div>${foo}</div>`) |
E.kickWatchdog(); | |
function KickWd(){ | |
if( (typeof(BTN1)=='undefined')||(!BTN1.read()) ) E.kickWatchdog(); | |
} | |
var wdint=setInterval(KickWd,2000); | |
E.enableWatchdog(15, false); | |
/* | |
// MIT License (c) 2020 fanoush https://github.com/fanoush | |
// see full license text at https://choosealicense.com/licenses/mit/ | |
var SPI2 = E.compiledC(` |