Last active
October 20, 2018 08:54
-
-
Save SukkaW/6e37090e1729584032c8b500b7ac67ec to your computer and use it in GitHub Desktop.
新理念外语网络教学中心(NPEL)自动点击
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* npel.js | v0.1.2 | |
* Author: Sukka (https://skk.moe) | |
* License: MIT | |
* | |
* Usage: 用电脑浏览器打开 新理念外语网络教学中心(推荐现代浏览器如 Chrome 或 Firefox) | |
* 点击需要学习的 Unit,按下 F12,找到 console,复制粘贴下述代码,并回车执行 | |
* How it works: 用 setInterval 每 30s 点击一次 <body> 元素并计数,NPEL 监听的是全 | |
* 局元素事件,不需要定位到 iframe | |
*/ | |
window.i = 0; | |
console.log('自动点击屏幕开始!') | |
setInterval(() => { | |
document.getElementsByTagName('body')[0].click(); | |
i = i + 1; | |
console.log(`已经模拟点击屏幕${i}次,本次已经「听课」${i * 0.5}分钟。`) | |
}, 30000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment