Review Skip

Clicks the "Skip" button every time it appears

目前为 2024-05-31 提交的版本,查看 最新版本

// ==UserScript==
// @name         Review Skip
// @namespace    https://gf.qytechs.cn/en/users/1291009
// @version      1.8
// @description  Clicks the "Skip" button every time it appears
// @author       BadOrBest
// @license      MIT
// @icon         https://www.google.com/s2/favicons?sz=64&domain=acellus.com
// @match        https://admin192c.acellus.com/student/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    // Function to click the "Skip" button
    function clickSkipButton(skipElement) {
        if (skipElement) {
            skipElement.click();
        }
    }

    // Function to handle mutations
    function handleMutations(mutationsList, observer) {
        for (const mutation of mutationsList) {
            if (mutation.type === 'childList') {
                // Check if a new element with the text "Skip" has been added
                const newSkipElements = Array.from(mutation.addedNodes).filter(node => node.textContent.trim() === 'Skip');
                if (newSkipElements.length > 0) {
                    // Click all new "Skip" elements
                    newSkipElements.forEach(newSkipElement => clickSkipButton(newSkipElement));
                }
            }
        }
    }

    // Function to continuously click the "Skip" button
    function clickSkipButtonContinuously() {
        // Find all spans containing the text "Skip"
        const skipSpans = Array.from(document.querySelectorAll('span')).filter(span => span.textContent.trim() === 'Skip');

        // Click each "Skip" span
        skipSpans.forEach(span => clickSkipButton(span));
    }

    // Create a MutationObserver to watch for changes in the DOM
    const observer = new MutationObserver(handleMutations);

    // Start observing changes in the entire document subtree
    observer.observe(document.documentElement, { childList: true, subtree: true });

    // Click the "Skip" button continuously every 1000 milliseconds (1 second)
    setInterval(clickSkipButtonContinuously, 1000);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址