Search

Wednesday, January 10, 2007

cfQuickDocs Bookmarklet

javascript:
(function(){
  var url='http://www.cfquickdocs.com/';
  var params='?sourceid=cfQDSearch1.02&getDoc=';
  searchString=prompt('Enter ColdFusion tag or function:','');
  searchString=((searchString==null)?'':searchString.replace(/^(\s+)?(.*?)(\s+)?$/gi,'$2'));
  if(searchString != ''){
    if(location.href.indexOf(url)==-1){
      var win=window.open(url+params+escape(searchString));
    }
    else{
      location.href=url+params+escape(searchString);
    }
  }
}
)();
To use in Firefox: Drag Lookup on cfQuickDocs to your bookmarks toolbar To use in Internet Explorer: 1. Right click on Lookup on cfQuickDocs and click on 'Add to Favorites' 2. Click "Yes" on the security warning For ease of use you can put the new favorite under the "Links" folder Related to that, here is a nifty bookrmarklet builder http://subsimple.com/bookmarklets/jsbuilder.htm
// //]]>