Grab Electives Using Scripting
Summary: Use the tampermonkey plug-in of Firefox browser to automatically grab lessons
1. Download tampermonkey plugin
-
First open the Firefox browser, click the upper right corner (as shown below), and then click Add-ons.
-
Enter "tampermonkey" in the search box and press Enter
-
The operation is as shown in the figure below
-
Wait for the download to complete, click Add
2. Create script
-
upper right corner of firefox browser
-
After deleting all the original content of the page, copy and paste the following code
// ==UserScript==
// @name xxx
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @match xxx
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.confirm = function(){
return true;};
window.alert = function(){
return true;};
setInterval(function(){
}, 500,setTimeout('history.go(0)',30000));
})();
-
Modify the code
to modify the two places in 1, directly copy and paste the URL of the course selection interface, as shown in the figure below
-
Modification 2
Find the course you want to brush, and press the F12 key on the keyboard on the course selection interface . After that, the operation is shown in the figure below.
-
Save and run the script. Note: After modifying the two pastes, add a semicolon after it (as shown in the figure below).
Finally click on file to save.
-
Go back to the course selection page and refresh. Note: It is normal that the verification code does not move after moving it once.