Sep 18

The other day I ran across an interesting post by Steve Rubel about Google’s real-time searching capabilities(LINK). He made a bookmarklet that enables you to enter a search term that will take you to a webpage that will show you anything relevant to that search from the last ten minutes.

Here is his bookmarklet:
javascript:(function()%7B%20p=prompt('Search%20term:',' ');%20if(p)%7B%20document.location.href='http://www.google.com/search?as_qdr=n10&q='%20+%20escape(p)%7D%20%7D)();

To use it you need to make a new bookmark in your browser and then copy and paste this code where you would usually have the http://website.com information in the bookmark editor.

I had some fun with his little piece of javascript and made a couple of my own. The first one that I reverse engineered was for Delicious.com.

I use delicious.com all the time for getting back to webpages where I forgot the links. Typically I would type: http://delicious.com/newhighscore/insert-a-tag-name-here – but with this bookmarklet I can just click the bookmarklet in my browser and enter a tag name to go to a page listing those links.

Here is the code for that bookmarklet:
javascript:(function()%7B%20p=prompt('Delicious%20Search%20term:','');
%20if(p)%7B%20document.location.href='http://www.delicious.com/
newhighscore/'%20+%20escape(p)%7D%20%7D)();

To use this one all you need to do is create a bookmarklet and replace the newhighscore text with the name that you use on delicious.com

The only other one that I’ve made so far is for unshortening a shortened link. I normally use greasemonkey to automatically unshorten links on web pages, but this bookmarklet has come in handy. I use the http://therealurl.appspot.com/website to convert the shortened links so at the moment this bookmarklet takes you to a webpage that just displays the unshortened link.

Here is the code:
javascript:(function()%7B%20p=prompt('Link%20to%20expand:','');%20if(p)%
7B%20document.location.href='http://therealurl.appspot.com/?url='%20+%20escape(p)%7D%20%7D)();

To finish up, here is one more that is taken from the Delicious web site.
javascript:(function(){f='http://delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent
(document.title)+'&v=5&';a=function(){if(!window.open
(f+'noui=1&jump=doclose','deliciousuiv5','location=yes,links=no,
scrollbars=no,toolbar=no,width=550,height=550'))location.href=
f+'jump=yes'};if(/Firefox/.test(navigator.userAgent))
{setTimeout(a,0)}else{a()}})()

When you click this bookmarklet it gives a pop-up that lets you save a bookmark on delicious.com. It works just like the delicious Firefox extension works. What’s nice about all of these bookmarklets is that they work in Firefox, Chrome, and in Opera… and Internet Exploerer.

I found another bookmarklet at 1bit.markwheeler.net this bookmarklet will add a tiny play button next to any links to mp3′s that are in a webpage. So if you go to 8bitpeoples.com and run into a list of mp3′s, you can click this bookmarklet and play buttons will load next to each mp3 link.

javascript:function%20loadScript(scriptURL)
{var%20scriptElem=document.createElement('script');
scriptElem.setAttribute('language','JavaScript');
scriptElem.setAttribute('src',scriptURL);document.body.appendChild(scriptElem);
}loadScript('http://1bit.markwheeler.net/bookmarklet.js');

Enjoy…

Jan 25

I thought this was great so I wanted to share it. If you click this link: Monster Attack! a monster will attack this page. If you  copy and paste the code below into your address bar the monster will attack what ever page you’re on. Have fun.

javascript:document.location.href=”http://bunnyherolabs.com/dhtml/monster.php?ref=”+escape(document.location.href)

Oct 21

Defender logo
I don’t usually pay too much attention to favicons but, I found an awesome one last week. Favicons are special icons used by web sites in order to display a logo in the header bar of web browsers. The favicon that caught my attention was made by Mathieu ‘p01′ Henri. He made a favicon that is actually a 16×16 pixle game made by making javascript continuously update the favicon on the fly. Check out his awesome favicon at:

http://www.p01.org/releases/DHTML_contests/files/DEFENDER_of_the_favicon/

The directions for how to play this game are on the page that the above link goes to. The favicon is the game.