您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
click the Take Course Button if it exists
// ==UserScript== // @name DiscUdemy Take Course Clicker // @namespace http://sagaryadav.com/ // @version 0.1 // @description click the Take Course Button if it exists // @author Sagar Yadav // @match https://www.discudemy.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=discudemy.com // @grant none // @license MIT // ==/UserScript== window.addEventListener('load', sleepLikeaBaby); function sleepLikeaBaby() { setTimeout(startProgram, 100); } function doClicking(thisElement) { thisElement.scrollIntoView({ block: "center", inline: "center", behavior: 'smooth' }); thisElement.innerText = 'TAKEN'; thisElement.style.color = '#FFA500'; // Orange color hex thisElement.style.font = '40px'; thisElement.target = '_top'; window.open(thisElement.href); } var insertLink = ""; function startProgram () { let CouponLink = document.getElementById('couponLink'); console.log(CouponLink, " = Couponlink"); if (CouponLink != null) { doClicking(CouponLink); } else { let allLinks = document.getElementsByTagName('a'); for (let a in allLinks) { // .classList.contains('secondary') if(allLinks[a].classList.contains('green') && allLinks[a].classList.contains('discBtn')) { doClicking(allLinks[a]); } } } }