#!/bin/bash # -*- mode: javascript -*- /* # Bookmark for adding GRID over current webpage usefull for measuring. # Bash bookmarks creator for web browser (real javascript begin after "exit") exec 0<"$0" UGLIFY="$(which uglifyjs)" if [ -x "$UGLIFY" ] ;then sed 1,/^exit/d | $UGLIFY -q 1 | sed 's/ /%20/g' else # Warning! This sed script is not well tested! sed -e '1,/^exit/d;s/[ \t]\(in\|as\)[ \t]/%20\1%20/g; s/\(box\|new\|return\|var\)[ \t]/\1%20/g; s/[ \t]*\(\)//g;H;${x;s/\n//g;s@/\*\([^/]*[^*]/\|[^/*]*\)*[*]/@@g;p;};d' fi exit 0 # */ javascript: (function() { var mdiv=document.createElement('div'); mdiv.setAttribute('style', "background:url(http://f-hauri.ch/vrac/webgrid.png);top:"+ "0px;left:0px;position:absolute;width:100%;height:100%;"); document.body.appendChild(mdiv); } ());