Using WSL (Ubuntu) on Windows 10.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
((document, limit) => { | |
const data = Array.from(document.querySelectorAll('*')) | |
.map((el) => ({zIndex: Number(getComputedStyle(el).zIndex), element: el })) | |
.filter(({ zIndex }) => !isNaN(zIndex)) | |
.sort((r1, r2) => r2.zIndex - r1.zIndex) | |
.slice(0, limit); | |
console.table(data); | |
})(document, 50); |
<!DOCTYPE html> | |
<title>Hello World!</title> | |
<button id="hello">Hello</button> | |
<script> | |
hello.onclick = () => alert('Hello World!'); | |
</script> |
{ | |
replaceWords(/猫/g, '犬'); | |
function replaceWords(target, result) { | |
const texts = []; | |
const els = document.querySelectorAll('title, body *:not(script):not(style)') | |
els.forEach(el => { | |
texts.push(...findTextNodes(el)) | |
}) | |
主に4種類あって、
To start:
{ | |
"private": "true", | |
"scripts": { | |
"js": "browserify -t [ babelify --presets [ es2015 ] ] src/main.js -o out/main.js", | |
"start": "watchify -v -t [ babelify --presets [ es2015 ] ] src/main.js -o 'exorcist out/main.js.map > out/main.js' -d" | |
}, | |
"dependencies": { | |
"babel-preset-es2015": "^6.22.0", | |
"babelify": "^7.3.0", | |
"browserify": "^14.1.0", |
// fetch | |
URL url = new URL("https://www.wikipedia.org/"); | |
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); | |
InputStream in; | |
try { | |
in = new BufferedInputStream(connection.getInputStream()); | |
} finally { | |
connection.disconnect(); | |
} |