Add the bookmarklet compiler

This commit is contained in:
devingfx 2018-07-01 18:40:37 +02:00
parent b6530b7ace
commit 8e012b4cfd
2 changed files with 16 additions and 0 deletions

16
kompilo.js Normal file
View File

@ -0,0 +1,16 @@
const { writeFileSync, readFileSync } = require('fs')
writeFileSync(
'kriptoptlet'
, `javascript:win=window.open('','','titlebar=no,location=no');win.document.write(\`${
readFileSync('kriptopter', 'utf8')
.replace(/`/g,'\\`')
.replace(/\$\{/g,'\\${')
.replace(/\n/g,'\\n')
}\`)`
, 'utf8'
)