Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Here You can type your custom JavaScript...$(document).ready(function(){
- var flag=0;
- var token;
- var site;
- var alias;
- $('.infostop:first').prepend('<li><button id="stop" type="button" class="btn btn-danger" style="height:50px;width:80px;">Stop</button></li>');
- $('.infostop:first').prepend('<li><button id="start" type="button" class="btn btn-primary" style="height:50px;width:80px;">Start</button></li>');
- $('#start').click(function(){
- flag=1;
- run();
- });
- $('#stop').click(function(){
- flag=0;
- });
- function run(){
- var interval_obj = setInterval(function(){
- token=$("#user-token").text();
- site=$('.item-site:first').text();
- alias=$('.item-site:first').parent().find(".item-alias").text();
- e=window.open(site+"/"+alias+"/"+token,"botvn","width=50,height=50,top=20000,left=100000,status=0,toolbar=no");
- if(flag===0)
- clearInterval(interval_obj);
- }, 4000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement