Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let  time = 15
  2. let  start = false
  3. let  pages = [
  4.     'https://www.instagram.com/shnurovs/',
  5.     'https://www.instagram.com/urgantcom/',
  6.     'https://www.instagram.com/norimyxxxo/',
  7.     'https://www.instagram.com/yurydud/',
  8.     'https://www.instagram.com/xenia_sobchak/',
  9.     'https://www.instagram.com/samoylovaoxana/',
  10.     'https://www.instagram.com/pavelvolyaofficial/',
  11.     'https://www.instagram.com/samburskaya/',
  12.     'https://www.instagram.com/missalena.92/',
  13.     'https://www.instagram.com/buzova86/',
  14.     'https://www.instagram.com/ververa/',
  15.     'https://www.instagram.com/muradosmann/',
  16.     'https://www.instagram.com/borodylia/',
  17.     'https://www.instagram.com/timatiofficial/',
  18.     'https://www.instagram.com/irinashayk/',
  19.     'https://www.instagram.com/mikhail_litvin/',
  20.     'https://www.instagram.com/_agentgirl_/',
  21.     'https://www.instagram.com/gan_13_/',
  22.     'https://www.instagram.com/karinakross/',
  23.     'https://www.instagram.com/samoylovaoxana/',
  24.  
  25.     ]
  26. $(document).ready(function(){
  27.     let interval;
  28.     let timeout;
  29.     var url = new URL(window.location.href);
  30.     var started = url.searchParams.get("started");
  31.     var unsubscibe = url.searchParams.get("unsubscibe");
  32.     var subscribe = url.searchParams.get("subscribe");
  33.     let urlarr = window.location.href.split('/')
  34.    
  35.     if(started === 'true'){
  36.       $('.nZSzR').prepend('<button id="stop">STOP</button>')
  37.         start()
  38.     }
  39.    
  40.   if(unsubscibe != null){
  41.     let index = parseInt(unsubscibe)
  42.     console.log("unsubscibe " + unsubscibe)
  43.     if(index >= pages.length - 1){
  44.       console.log("Отписались от говна")
  45.       return
  46.     }
  47.    
  48.     index++
  49.     let  a = document.getElementsByClassName("_5f5mN");
  50.  
  51.         if(a[0].innerText == "Following"){
  52.             a[0].click()
  53.             b = document.getElementsByClassName("-Cab_");
  54.             b[0].click()     
  55.             console.log("Отписка");
  56.         }else{
  57.           window.location.href = pages[index] + "?unsubscibe=" + index;
  58.         }
  59.        
  60.     timeout =  setTimeout(function() {
  61.           window.location.href = pages[index] + "?unsubscibe=" + index;
  62.         }, 3000);
  63.   }
  64.  
  65. if(subscribe != null){
  66.     let index = parseInt(subscribe)
  67.     console.log("subscribe" + subscribe)
  68.     if(index >= pages.length - 1){
  69.       console.log("Подписались на говно")
  70.       return
  71.     }
  72.    
  73.     index++
  74.     let  a = document.getElementsByClassName("_5f5mN");
  75.  
  76.         if(a[0].innerText != "Following"){
  77.             a[0].click()
  78.             console.log("Подписка");
  79.         }else{
  80.           window.location.href = pages[index] + "?subscribe=" + index;
  81.         }
  82.        
  83.     timeout = setTimeout(function() {
  84.           window.location.href = pages[index] + "?subscribe=" + index;
  85.         }, 30000);
  86.   }
  87.  
  88.  
  89.     $('.nZSzR').prepend('<button id="start">START</button>')
  90.    
  91.     $('.nZSzR').prepend('<button id="unsubscibe">unsubscibe</button>')
  92.     $('.nZSzR').prepend('<button id="subscribe">subscribe</button>')
  93.    
  94.     $('#stop').on('click', function(){
  95.       console.log('Скрипт остановлен.')
  96.       clearTimeout(timeout)
  97.         clearInterval(interval)
  98.     })
  99.  
  100.     $('#start').on('click', function(){
  101.       clearTimeout(timeout)
  102.         start()
  103.     })
  104.    
  105.     $('#unsubscibe').on('click', function(){
  106.             window.location.href = pages[0] + "?unsubscibe=0";
  107.     })
  108.    
  109.     $('#subscribe').on('click', function(){
  110.             window.location.href = pages[0] + "?subscribe=0";
  111.     })
  112.    
  113.     function start(){
  114.         for(let  i = 0; i < pages.length; i++){
  115.             if(pages[i] == 'https://www.instagram.com/' + urlarr[3] + "/"){
  116.                 interval = setInterval(nakr, time * 1000);
  117.                 console.log("Скрипт запущен.");
  118.                 return
  119.             }
  120.         }
  121.         window.location.href = pages[index] + "?started=true";
  122.     }
  123.  
  124.     function nakr() {
  125.         let  a = document.getElementsByClassName("_5f5mN");
  126.  
  127.         if(a[0].innerText == "Following"){
  128.             a[0].click()
  129.             b = document.getElementsByClassName("-Cab_");
  130.             b[0].click()     
  131.             console.log("Отписка");
  132.         }else{
  133.             a[0].click()
  134.             console.log("Подписка");
  135.         }
  136.  
  137.         for(let  i = 0; i < pages.length; i++){
  138.             if(pages[i] == 'https://www.instagram.com/' + urlarr[3] + "/"){
  139.                 let page;
  140.                 if(i == pages.length - 1){
  141.                     page = 0   
  142.                 }else{
  143.                     page = i + 1
  144.                 }
  145.                 setTimeout(function() {
  146.                     window.location.href = pages[page] + "?started=true";
  147.                 }, 3000);
  148.                 break;
  149.             }
  150.         }
  151.     }
  152.  
  153. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement