Grab Electives Using Scripting

Summary: Use the tampermonkey plug-in of Firefox browser to automatically grab lessons

1. Download tampermonkey plugin

  1. First open the Firefox browser, click the upper right corner (as shown below), and then click Add-ons.
    insert image description here

  2. Enter "tampermonkey" in the search box and press Enter
    insert image description here

  3. The operation is as shown in the figure below
    insert image description here

  4. Wait for the download to complete, click Add
    insert image description here

2. Create script

  1. upper right corner of firefox browser
    insert image description here

  2. 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));
})();

  1. Modify the code
    Modifications 1 and 2 see the next two steps
    to modify the two places in 1, directly copy and paste the URL of the course selection interface, as shown in the figure below
    insert image description here

  2. 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.
    insert image description here

  3. 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.
    insert image description here

  4. Go back to the course selection page and refresh. Note: It is normal that the verification code does not move after moving it once.

3. Check the effect

insert image description here

Guess you like

Origin blog.csdn.net/qq_44324007/article/details/111594946