bpoole

Google "Zerg Rush" Easter Egg Hack

May 3rd, 2012
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //place the following in your Firebug Javascript command editor and run after searching for "zerg rush" on google.com
  2.  
  3. //slow down the interval (eg: 1500) to make the results more "visual"
  4. setInterval("click_zergs( )", 500);
  5.  
  6. function click_zergs( ){
  7.     divs = document.getElementsByTagName('div');
  8.     div_len = divs.length;
  9.     for(i = 0; i < div_len; i++){
  10.         t_div = divs[i];
  11.         if(t_div.className == 'zr_zergling_container'){
  12.             var event = document.createEvent("MouseEvents");
  13.             event.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  14.             t_div.dispatchEvent(event);
  15.             //uncomment below to eliminate zerg immediately
  16.             //t_div.dispatchEvent(event);
  17.             //t_div.dispatchEvent(event);
  18.         }
  19.     }
  20. }
Add Comment
Please, Sign In to add comment