Skip to content

Instantly share code, notes, and snippets.

@midu
Created May 12, 2011 19:28
Show Gist options
  • Save midu/969254 to your computer and use it in GitHub Desktop.
Save midu/969254 to your computer and use it in GitHub Desktop.
Best bookmarklet
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){nb_lols=0;midu=null;
$(document).ready(function(){$.fn.makeColor=function(){colors=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];color="#";for(i=0;i<6;)j=Math.floor(Math.random()*15),color+=colors[j],i+=1;return color};$.fn.makeP=function(){return p=$("<p></p>").css("color",$.fn.makeColor()).css("display","inline-block").css("font-weight","bold").css("padding","3px").css("position","fixed").css("z-index","1500")};$.fn.makeLol=function(){lol=$.fn.makeP();lol.html("lol").css("font-size",Math.floor(Math.random()*
20)+30+"px").css("left","-5%");return lol};$.fn.sendLol=function(){lol=$.fn.makeLol();lol.css("top",Math.floor(Math.random()*95)+"%");$("body").prepend(lol);$.fn.launchLol(lol)};$.fn.launchLol=function(a){a.animate({left:"120%"},Math.floor(Math.random()*7E3)+3E3,"swing",function(){--nb_lols;$.fn.sendLol()})};$.fn.kikouLettre=function(a,b){l=$.fn.makeP();l.html(a).css("left",b+"%").css("top","-5%").css("z-index","2000").css("font-size",Math.floor(Math.random()*70)+200+"px");$("body").prepend(l);return l};
$.fn.removeAndAnimateAgain=function(a){midu=a;a.animate({top:"105%"},Math.floor(Math.random()*2E3)+1E3,"swing",function(){$(this).css("top","-5%").css("color",$.fn.makeColor());$.fn.animateLetter($(this))})};$.fn.animateLetter=function(a){a.animate({top:"45%"},Math.floor(Math.random()*2E3)+1E3,"swing",function(){$(this).effect("bounce",{times:5},1E3,function(){$.fn.removeAndAnimateAgain($(this))})})};$.fn.kikote=function(){midu=kikou=[$.fn.kikouLettre("K",10),$.fn.kikouLettre("i",30),$.fn.kikouLettre("k",
50),$.fn.kikouLettre("o",60),$.fn.kikouLettre("u",80)];for(i in kikou)lettre=kikou[i],$.fn.animateLetter(lettre)};for(k=0;k<20;)$.fn.sendLol(),k+=1;$.fn.kikote()});});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment