-DC Bookmarklet Testing Ground-
banner switch
javascript:void(imgs=document.images);for(i=0;i<imgs.length;i++){if((imgs[i].width==468)&&(imgs[i].height==60))void(imgs[i].src="http://www.webreference.com/js/docjsad.gif");}
date and time
javascript:var dt78KwZ9=new Date();alert(dt78KwZ9.toLocaleString())
length of string
javascript:void(strL6G=prompt('Give a text string (up to 255 chars)',''));if(strL6G!=null){ov34U=255-strL6G.length;void(alert('Length of string is '+strL6G.length+'. This is '+ov34U+' from 255.'))}
google's ifl
javascript:void(q=prompt('Enter desired Google search string below',''));if(q)void(location='http://www.google.com/search?q='+escape(q)+'&btnI=I%27m+Feeling+Lucky')
???
javascript:if(document.images.length<1){alert('No image on page!')}else{for(jK6bvW=0;jK6bvW<document.images.length;jK6bvW++){if((document.images[jK6bvW].width==468)&&(document.images[jK6bvW].height==60))void(document.images[jK6bvW].src='gone')}void(null)}
???
javascript:if (document.images.length<1){alert('No image on page!')}else{for(jK6bvW=0;jK6bvW<document.images.length;jK6bvW++){void(window.document.images[jK6bvW].src='missing');}void(null)}
resize first image on page?
javascript:if(document.images.length<1){alert('No image!')}else{D0iB=document.images[0];sZ2T=prompt('Resize by..','1.5');if(sZ2T){with(document){write('<img src='+D0iB.src+' width='+sZ2T*D0iB.width+' height='+sZ2T*D0iB.height+'>');close()}}}void(null)
change background color
javascript:if(frames.length<1){void(document.bgColor=prompt('Change to which background color?',''))}else{alert('Page has frames. Use the version of this bookmarklet for frames. (bookmarklets.com)')}
send yahoo instant message
javascript:void(q=prompt('Enter Yahoo! user ID',''));if(q)void(location='http://edit.yahoo.com/config/send_webmesg?.target='+q+'&.src=pg'+escape(q))
use of .length
javascript:alert("string".length)
links on a page?
javascript:alert(document.links)
document location
javascript:alert(document.location)
use of document.write
javascript:document.write("testing")
read all images?
javascript:alert(document.images)
mail url?
(take out the 'href's')
javascript:location.href='mailto:?SUBJECT=' + document.title + '&BODY=' + escape(location.href)
title of document
javascript:alert(document.title)
change bg to white
javascript:void(document.bgColor='#FFFFFF')
change bg to black
javascript:void(document.bgColor='#000000')
read cookie
javascript:alert(document.cookie)
???
javascript:alert(window.document.all[0].outerHTML)
???
javascript:void(self.location='http://validator.w3.org/check?uri='+escape(self.location))