Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with:

Shorthand Notation For Searching

By Ben Nadel on

I implemented this last week and have already grown to love it. It probably won't be useful to others but I thought I would throw it up here in case someone likes it. You can search my site by going to:

... where everything after the "search/" will be the search criteria. This is great for me because I know what I have posted so I can be like "Oh yeah, where was that" and then search for it fast. It's not perfect, and if you search for "//" it gets the relative web paths messed up... but come on, it's just a short hand.

Reader Comments

I was searching your blog for something this morning so here is a quick bookmarklet I put together based on your search:

javascript:(function(){var url='';searchString=prompt('Enter search string for','');searchString=((searchString==null)?'':searchString.replace(/^(\s+)?(.*?)(\s+)?$/gi,'$2'));if(searchString!=''){if(location.href.indexOf(url)==-1){var;}else{location.href=url+params+escape(searchString);}}})();

Reply to this Comment


I had a JavaScript error in the above script. Here is the updated one:
javascript:(function(){var url='';searchString=prompt('Enter search string for','');searchString=((searchString==null)?'':searchString.replace(/^(\s+)?(.*?)(\s+)?$/gi,'$2'));if(searchString!=''){if(location.href.indexOf(url)==-1){var;}else{location.href=url+escape(searchString);}}})();

Reply to this Comment

Hmmm, it worked for me, but I wasn't trying to break it or anything (I did just one word). Looks good.

Reply to this Comment

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.