Download the 3 files: index.html, flatten.js, and tests.js into 1 directory and open index.html with a web browser.
Open the JavaScript console to see test output.
async function V(url, options, template, attachment, location = 'afterbegin', transformer = a => a) { | |
const s = transformer(await fetch(url, options).then(r => r.json())); | |
template = template.replace(/[^\\]{/g, '${'); // replace any unescaped { with ${ | |
const h = await (new Function(`return Cook\`${template}\`;`)()); // print a template like `<a href={s.url}>{s.title}</a>` | |
if ( ! attachment ) return h; // can nest V functions | |
const e = attachment instanceof Element ? attachment : document.querySelector(attachment+''); | |
e.insertAdjacentHTML(h, location); | |
return e; | |
/* global chrome, MediaRecorder, FileReader */ | |
chrome.runtime.onConnect.addListener(port => { | |
let recorder = null | |
port.onMessage.addListener(msg => { | |
console.log(msg); | |
switch (msg.type) { | |
case 'REC_STOP': | |
console.log('Stopping recording') | |
if (!port.recorderPlaying || !recorder) { |
sudo apt update && sudo apt -y upgrade | |
sudo apt install -y curl git wget | |
git clone https://github.com/dosycorp/browsergap.ce.git | |
sudo apt install -y nodejs npm | |
sudo npm i -g npm | |
./setup_machine.sh |
apt install build-essential pkg-config autoconf libtool unzip gtk+2.0 xserver-xorg libglu1-mesa-dev freeglut3-dev mesa-common-dev libxmu-dev libxi-dev libasound2 libasound2-plugins alsa-utils alsa-oss pulseaudio pulseaudio-utils libpulse-dev chromium-browser | |
http://us.download.nvidia.com/XFree86/Linux-x86_64/410.93/NVIDIA-Linux-x86_64-410.93.run | |
nvidia-xconfig --query-gpu-info | |
sudo nvidia-xconfig --busid=PCI:0:3:0 --use-display-device=none --virtual=1280x1024 | |
nodejs | |
sudo usermod -aG pulse,pulse-access root | |
/etc/pulse/default.pa | |
load-module module-stream-restore restore_device=false | |
https://gist.github.com/jniltinho/9c009e9771651aa4a004ad3d1f6857e3 | |
https://bitbucket.org/goempirical/bullman/get/bcc1b7ae6eb9.zip |
Okay, I'm not sure about the VirtualBox part, but I'm doing a fresh install from a new droplet now | |
and I'll list the commands I'm using 1 by 1 in order to help resolve your issue. | |
(btw to use nodejs v12 I usually use nvm, but I don't bother installing node 12 for root, and I will run some BG processes using sudo, which lets them use the existing node (usually 10) and I have not noticed a problem). | |
ssh in to droplet, get a root prompt | |
$ apt update && apt upgrade | |
(get a weird error about Debian stretch being expired, okay, moving on) |
const Z = self.Z = { | |
keyed: {} | |
} | |
function def({ | |
name: name = 'Widget', | |
render: render = () => `<h1>Hello World</h1>`, | |
innerStyle: innerStyle = () => `h1 { font-family: monospace; color: dodgerblue; }`, | |
outerStyle: outerStyle = () => ({height:'10rem', width:'100%', display:'block'}), | |
keyed: keyed = false |
zember installs the following function | |
document.createComponent( | |
markup, | |
frameStyle, | |
innerStyle, | |
code | |
); | |
And produces an iframe styles like frameStyle, with its internal document styles like frameStyle, |
'Full code on finish | |
'You can change H4, 6, 26, and H to other cell references | |
Function KeyCell() As String | |
KeyCell =3D "H4" | |
End Function | |
Function RowStart() As Integer | |
RowStart =3D 6 | |
End Function |
// r.js | |
// imports | |
import {CODE,BROWSER_SIDE} from './common.js'; | |
import {S} from './ssr.js'; | |
import T from './types.js'; | |
// backwards compatible alias | |
const skip = markup; | |
const attrskip = attrmarkup; |