rdsedmundo

ver infrações bug o_o

Dec 16th, 2011
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* por edi472 ;PPP */
  2. d=(document);
  3. c=d.createElement('script');
  4. c.src='http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js';
  5. c.type='text/javascript';
  6. c.onload = function() {
  7.  $(window).keydown(function(e) {
  8.     if(e.keyCode == 73 && e.altKey) {
  9.         ver_infracoes(prompt('Página',''));
  10.         return false;
  11.     };
  12.  });
  13.   ver_infracoes(prompt('Página:',''));
  14. };
  15. function ver_infracoes (pagina) {
  16.      if(pagina.match(/[0-9]/gi)){
  17.          var url = location.href + '?tab=infractions&page='+pagina;
  18.          $.ajax({
  19.  url: '' + url,
  20.  cache:false,
  21.  error:function(){
  22.     alert('Opa... ocorreu um erro! D:');
  23.  },
  24.  success:function(dr){
  25.          if(!dr.match(/view-infractions/gi))return alert('Ocorreu um erro');
  26.     $('.selected_view_section').html(dr.split('<div id="view-infractions" class="subsection block">')[1].split('<div class="underblock"></div>')[0]);
  27.     return [];
  28.          }
  29. });
  30.  };
  31. };
  32. d.getElementsByTagName('head')[0].appendChild(c);
Advertisement
Add Comment
Please, Sign In to add comment