Guest User

Traf geta

a guest
Dec 15th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('<tr><td>Traf geta</td><td><input type="text" id="target-get"><span>Ostatni: <span id="last-get"></span></span></td></tr>')
  2.     .insertAfter($('#postForm tbody tr').eq(3));
  3.  
  4. window.setInterval(function() {
  5.     $.ajax({
  6.         url:'https://karachan.org/notify.json',
  7.         dataType:'JSON',
  8.         success: function(d) {
  9.             $('#last-get').text(d[config.board]);
  10.             if (/^\d+$/.test($('#target-get').val()) && parseInt($('#target-get').val()) === parseInt(d[config.board]) + 1) {
  11.                 $('#postForm button.ladda-button').click();
  12.             }
  13.         }
  14.     });
  15. }, 1000);
Add Comment
Please, Sign In to add comment