Skip to content

Instantly share code, notes, and snippets.

@miukoba
Created November 9, 2012 03:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miukoba/4043586 to your computer and use it in GitHub Desktop.
Save miukoba/4043586 to your computer and use it in GitHub Desktop.
inject jQuery
javascript:(function(){javascript:(function(){var src_url = 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';var notice_style ='position:fixed;'+'z-index:10000;'+'top:0;'+'left:0;'+'background-color:red;'+'color:white;'+'padding:10px;'+'margin:10px;'+'font:bold 16px sun-serif;';var s=document.createElement('script');s.setAttribute('src',src_url);document.getElementsByTagName('body')[0].appendChild(s);var id = window.setInterval(function(){if (window['jQuery'] &&window['jQuery']['fn'] &&window['jQuery']['fn']['offset']){window.clearInterval(id);$('<div style=\''+notice_style+'\'><p>jQuery '+ jQuery.fn.jquery+' Loaded!<p></div>').appendTo('body').animate({opacity:1},2000).animate({opacity:'hide'},500,function(){jQuery(this).remove();});}},100);})();})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment