NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @namespace https://www.youtube.com/channel/UCzL3j7ch8o7lbIBLYdSPVuQ?sub_confirmation=1 // @name Ytmonster Sub youtube auto // @version 1.0 // @description Ytmonster Sub youtube auto // @license MIT // @author Thang Dang // @match https://ytmonster.ru/task/ // @copyright 2019, thangdangblog (https://openuserjs.org/users/thangdangblog) // @updateURL https://openuserjs.org/meta/thangdangblog/Ytmonster_Sub_youtube_auto.meta.js // @homepage https://www.youtube.com/channel/UCzL3j7ch8o7lbIBLYdSPVuQ?sub_confirmation=1 // @match https://www.youtube.com/channel/* // @grant none // ==/UserScript== (function() { 'use strict'; var strUrl = window.location.href; if(strUrl.indexOf("ytmonster.ru") != -1){ document.querySelectorAll(".panel-body.choseTypeTask")[1].click(); document.querySelector(".btn.btn-warning.openTask").click(); var submitrun = _ =>{ setInterval(function(){ document.querySelector(".btn.btn-warning.openTask").click(); },40000); } submitrun(); }else { console.log("ytb"); function likeVideo(){ document.querySelectorAll("#top-level-buttons > ytd-toggle-button-renderer")[0].click(); } function subVideo(){ document.querySelector(".style-scope.ytd-subscribe-button-renderer").click(); } function turnOffAlert(){ if(document.querySelector("#cancel-button")){ document.querySelector("#cancel-button").click() } } function scrollFunc(){ window.scrollTo(0,800); } function closeWindow(){ window.close(); } function runLikeVideo(){ //setTimeout(scrollFunc,10000); //setTimeout(likeVideo,15000); setTimeout(subVideo,15000); //setTimeout(turnOffAlert,81000); setTimeout(closeWindow,35000); } runLikeVideo(); } })();