rdsedmundo

code da wc

Dec 1st, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var p;
  2. if(typeof $ != 'function'){
  3. d=(document);
  4. c=d.createElement('script');
  5. c.src='http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js';
  6. c.type='text/javascript';
  7. c.onload = function() {
  8.   ver_infracoes(2);
  9. };
  10. } else {
  11.   var p = true;
  12. };
  13. d.getElementsByTagName('head')[0].appendChild(c);
  14. function ver_infracoes (pagina) {
  15.      if(pagina.toString().match(/[0-9]/gi)) {
  16.          alert(Date.now());
  17.          var url = location.href + '?tab=infractions&page=2';
  18.          $.ajax({
  19.  url:url,
  20.  cache:false,
  21.  error:function(){
  22.     alert('Opa... ocorreu um erro! D:');
  23.  },
  24.  success:function(d){
  25.    alert(typeof d);
  26.          if(!d.match(/view-infractions/gi)) return alert('Ocorreu um erro');
  27.          alert('lol');
  28.             alert(d.match('<div id="view-infractions" class="subsection block">(.*?)<\/div>'));
  29.          }
  30. });
  31.  };
  32.     infracoes = $('#view-infractions-content').html();
  33.     $('.selected_view_section').html(infracoes);
  34. };
  35.  p === true ? ver_infracoes(2) : null;
Advertisement
Add Comment
Please, Sign In to add comment