Facebook
From Trivial Panda, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 211
  1. var d = new Date(); d.setTime(d.getTime() + 3600000 * 24 * 30);
  2. if(getCookie('acceptGrp') == null) setCookie('acceptGrp','false',d);
  3.  
  4. var acceptGrp = mAlert;
  5. mAlert = function(a,c,d,b){
  6.     acceptGrp(a,c,d,b);
  7.     if(getCookie('acceptGrp') == 'true' && a.indexOf('Party invitation received from') != -1) $('#a_ok').click();
  8. };
  9.  
  10. g.loadQueue.push({fun: function () {
  11. $('<div id="checkboxgrp">Automatyczne przyjmowanie zaproszen do grupy</div>').appendTo('#cfg_options').click(function(){
  12. if($('#checkboxgrp').attr('style') == 'background-position: 0px -22px'){
  13. $('#checkboxgrp').attr('style', 'background-position: 0px 0px');
  14. setCookie('acceptGrp','false',d)
  15. }else{
  16. $('#checkboxgrp').attr('style', 'background-position: 0px -22px');
  17. setCookie('acceptGrp','true',d)
  18. }
  19. });
  20. if(getCookie('acceptGrp') == 'true') $('#checkboxgrp').attr('style', 'background-position: 0px -22px');
  21. else $('#checkboxgrp').attr('style', 'background-position: 0px 0px');
  22. }, data: ''});
  23.  
  24. $(document).keyup(function(e){
  25.     if(e.which==75 && e.target.tagName!="TEXTAREA" && e.target.tagName!='INPUT'){
  26.         for(n in g.other){
  27.             if ((Math.abs(hero.x - g.other[n].x) <= 1 && Math.abs(hero.y - g.other[n].y) <= 1) && !isset(g.party[n])){
  28.                 _g("party&a=inv&id="+n)
  29.             }
  30.         }
  31.     }