Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I find this very useful.

On Unix, when you have Node.js installed, you can avoid the Docker overhead for creation of a bookmarklet from a JS file with a shell script like this:

  cat 'kill-sticky.js' \
   | tr -s '\011\012\015\040' '\040' \
   | node -e 'console.log(`javascript:${encodeURIComponent(fs.readFileSync(process.stdin.fd).toString())}`)'
Insert the output as your bookmarklet's URL.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: