Skip to content

Instantly share code, notes, and snippets.

@yeco
Created March 9, 2011 22:11
Show Gist options
  • Select an option

  • Save yeco/863120 to your computer and use it in GitHub Desktop.

Select an option

Save yeco/863120 to your computer and use it in GitHub Desktop.
javascript:void((function(){function%20load(type,%20src)%20{if%20(type%20==%20'css')%20{%20var%20s%20=%20document.createElement('link');s.setAttribute('href',%20src);s.setAttribute('type',%20'text/css');s.setAttribute('rel',%20'stylesheet');}%20else%20{var%20s%20=%20document.createElement('script');s.setAttribute('src',%20src);s.setAttribute('type',%20'text/javascript');}%20document.getElementsByTagName('head')[0].appendChild(s);%20};%20function%20whenLoaded(callback){%20if%20(typeof(window['jQuery'])%20!=%20'undefined'%20&&%20typeof(window['jQuery']['fn']['sundayMorning'])%20==%20'function')%20{%20callback();%20}%20else%20{setTimeout(function()%20{whenLoaded(callback)%20},%20100);}%20};load('src',%20'http://code.jquery.com/jquery-latest.pack.js');load('src',%20'http://sundaymorning.jaysalvat.com/bookmarklet/jquery.sundaymorning.js');load('css',%20'http://sundaymorning.jaysalvat.com/bookmarklet/jquery.sundaymorning.css');whenLoaded(function()%20{alert('Knowledge%20Elements\n\nReady%20to%20translate!\nDouble-click%20+%20Shift%20for%20inline%20translation.\nDouble-click%20+%20Ctrl%20for%20word%20translation');jQuery(':header,p,li,div').sundayMorning({trigger:'dblclick',shiftKey:true,destination:'en'});jQuery(':header,p,li,div').sundayMorningBubble({ctrlKey:true,destination:'en'});});})());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment