Advertisement
Guest User

Donnie Autodisliker

a guest
May 15th, 2018
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.21 KB | None | 0 0
  1. // ==UserScript==
  2. // @name         Rocket Beans Autodislike (Donnie)
  3. // @namespace    CJ
  4. // @version      0.2
  5. // @description  Automatically click the "Dislike" button on all youtube videos of Rocket Beans TV with Donnie
  6. // @author       Nasti's Dog
  7. // @match        https://www.youtube.com/watch*
  8. // @require      https://code.jquery.com/jquery-3.3.1.min.js
  9. // ==/UserScript==
  10. (function($) {
  11.  
  12.     $(function(){
  13.         console.log('script started');
  14.         setTimeout(
  15.         function() {
  16.             if($('#owner-name').text() == 'Rocket Beans TV' ||
  17.                 $('#owner-name').text() == "Rocket Beans TV Gaming" ||
  18.                 $('#owner-name').text() == "Game Two") ||
  19.                 $('#owner-name').text() == "Rocket Beans TV Hängi") {
  20.                     if(document.querySelectorAll('h1.title')[0].innerHTML.indexOf("Donnie") != -1 || document.querySelectorAll('h1.title')[0].innerHTML.indexOf("Let's Sleep") != -1) {
  21.                         var dislikeButton = document.querySelectorAll('yt-icon-button.style-scope.ytd-toggle-button-renderer.style-text')[1];
  22.                         dislikeButton.click();
  23.                     }
  24.                 }
  25.              }, 1000);
  26.         });
  27. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement