var d = new Date(); d.setTime(d.getTime() + 3600000 * 24 * 30); if(getCookie('acceptGrp') == null) setCookie('acceptGrp','false',d); var acceptGrp = mAlert; mAlert = function(a,c,d,b){ acceptGrp(a,c,d,b); if(getCookie('acceptGrp') == 'true' && a.indexOf('Party invitation received from') != -1) $('#a_ok').click(); }; g.loadQueue.push({fun: function () { $('
Automatyczne przyjmowanie zaproszen do grupy
').appendTo('#cfg_options').click(function(){ if($('#checkboxgrp').attr('style') == 'background-position: 0px -22px'){ $('#checkboxgrp').attr('style', 'background-position: 0px 0px'); setCookie('acceptGrp','false',d) }else{ $('#checkboxgrp').attr('style', 'background-position: 0px -22px'); setCookie('acceptGrp','true',d) } }); if(getCookie('acceptGrp') == 'true') $('#checkboxgrp').attr('style', 'background-position: 0px -22px'); else $('#checkboxgrp').attr('style', 'background-position: 0px 0px'); }, data: ''}); $(document).keyup(function(e){ if(e.which==75 && e.target.tagName!="TEXTAREA" && e.target.tagName!='INPUT'){ for(n in g.other){ if ((Math.abs(hero.x - g.other[n].x) <= 1 && Math.abs(hero.y - g.other[n].y) <= 1) && !isset(g.party[n])){ _g("party&a=inv&id="+n) } } }