thangdangblog / Ytmonster Like INS auto

// ==UserScript==
// @name         Ytmonster Like INS auto
// @namespace    https://www.youtube.com/channel/UCzL3j7ch8o7lbIBLYdSPVuQ?sub_confirmation=1
// @version      0.1
// @description  Ytmonster Like INS auto
// @author       Dang Thang
// @copyright 2019, thangdangblog (https://openuserjs.org/users/thangdangblog)
// @updateURL https://openuserjs.org/meta/thangdangblog/Ytmonster_Like_INS_auto.meta.js
// @license MIT
// @match        https://ytmonster.ru/task/
// @match        https://www.instagram.com/*
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
	var strUrl = window.location.href;
	if(strUrl.indexOf("ytmonster.ru") != -1){
		document.querySelectorAll(".panel-body.t-list")[2].click();
		var submitrun = _ =>{
			setInterval(function(){
				document.querySelector(".btn.btn-warning.openTask").click();
			},12000);
		}
		submitrun();
	}else{
        var delayTime = _ =>{
            setTimeout(function(){
            document.querySelector(".dCJp8.afkep._0mzm-").click();
                var closefunction = _ =>{
                    setTimeout(function(){
                        window.close();
                    },5000);
                }
                closefunction();
            },2000)
        }
        delayTime();
	}
})();