Monthly Archives: August 2011

Netflix search bookmarklet

Drag this link to your bookmarks, or copy paste the URL.

Search Netflix

What it does: Takes the current selected text and sends it to Netflix.com as a search string. If no text is selected a prompt window will pop-up allowing you to manually enter a term. Also, if you are browsing The Internet Movie Database (IMDb) when you select it the title of the page will be used as the search string.

What it is:

is_imdb=/.imdb.com/;
if(is_imdb.test(document.domain)){
  q=document.title.split(' - IMDb',1);
}else{
  if(getSelection()!=''){
    q=getSelection();
  }else{
    void(q=prompt('Enter search term (Netflix)',''));
  }
}
if(q){
  window.open('http://netflix.com/WiSearch?v1='+escape(q));
}

Mac ready “lightbox” close widget

I use a Mac, you use a Mac. Our close window button is in the top left corner of the window so it’s convenient when a JavaScript pop-over puts the “button” there, though most don’t. A few I run into I’ve decided to throw some CSS at to fix them.

/**** Mac ready "close" widget ****/
/* Wordpress admin "More info..." */
div#TB_ajaxWindowTitle {
  position:absolute;
  top:0px;
  left:25px;
  float:none !important;
  display:inline !important;
}
div#TB_closeAjaxWindow {
  display:inline !important;
  float:left !important;
  clear:left !important;
}
/* Amazon */
div.ap_close {
  left: 24px !important;
}
span.ap_closebutton {
  float:left;
  clear:left;
}
/* "Fancybox" */
a#fancybox-close {
  left:-15px !important;
}
/* "MultiBox" */
div.MultiBoxClose {
  left:-26px !important;
}
/* Disqus profile */
a.dsq-modal-close-btn {
  position:absolute !important;
  top:10px !important;
  left:10px !important;
}

This would of course go into your user defined CSS file. Which in Safari can be added at Safari > Preferences | Advanced – Style sheet: