#!/bin/bash # #// Javascript Bookmarklet #// Opens all images linked from a given page on a new page. # cat $0 | sed 's@^#@@' | sed 's@//.*$@@' | sed 's@^[\t ]*$@@' | sed 's@^!/bin/bash@@' | sed 's@^cat .*@@' | sed '/^$/d' | sed 's@^[\t ]*@@' | tr '\n' ' ' && echo "" #javascript:(function(){ # #//Identify images #//Return true if an image #function I(u){ # //Split the URL in two # var t=u.split('.'); # # //The extension is stored in e # var e=t[t.length-1].toLowerCase(); # # //Return true if e is one of the following extensions # return {gif:1,jpg:1,jpeg:1,png:1,mng:1}[e] #} # #//HTML ESCAPE #//Replace special characters with HTML escape codes. #function hE(s){ # return s.replace(/&/g,'&').replace(/>/g,'>').replace(/Images linked to by '+hE(location.href)+':
'+q.innerHTML+' ('+hE(h)+')');
#}
#
#//Close the output stream
#z.close();
#
#})()