Advertisement
dinhvinhson

Untitled

Feb 25th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. // Here You can type your custom JavaScript...$(document).ready(function(){
  2. var flag=0;
  3. var token;
  4. var site;
  5. var alias;
  6. $('.infostop:first').prepend('<li><button id="stop" type="button" class="btn btn-danger" style="height:50px;width:80px;">Stop</button></li>');
  7. $('.infostop:first').prepend('<li><button id="start" type="button" class="btn btn-primary" style="height:50px;width:80px;">Start</button></li>');
  8. $('#start').click(function(){
  9. flag=1;
  10. run();
  11. });
  12. $('#stop').click(function(){
  13. flag=0;
  14. });
  15. function run(){
  16. var interval_obj = setInterval(function(){
  17. token=$("#user-token").text();
  18. site=$('.item-site:first').text();
  19. alias=$('.item-site:first').parent().find(".item-alias").text();
  20. e=window.open(site+"/"+alias+"/"+token,"botvn","width=50,height=50,top=20000,left=100000,status=0,toolbar=no");
  21. if(flag===0)
  22. clearInterval(interval_obj);
  23. }, 4000);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement