您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automates solving Cloudflare Challenges with optimal performance and maintainability
当前为
- // ==UserScript==
- // @name CloudFlare Challenge Optimized
- // @version 0.2
- // @description Automates solving Cloudflare Challenges with optimal performance and maintainability
- // @author AstralRift
- // @namespace https://greasyfork.org/users/1300060
- // @match https://challenges.cloudflare.com/*
- // @grant none
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- function attemptChallenge() {
- const targets = [
- "#cf-stage > div.ctp-checkbox-container > label > span",
- "input[value='Verify you are human']",
- ".ctp-checkbox-label"
- ];
- for (let selector of targets) {
- const element = document.querySelector(selector);
- if (element) {
- element.click();
- return true;
- }
- }
- return false;
- }
- function setupObserver() {
- const observer = new MutationObserver(mutations => {
- if (attemptChallenge()) {
- observer.disconnect();
- }
- });
- observer.observe(document.body, { childList: true, subtree: true });
- }
- function setupInterval() {
- const intervalId = setInterval(() => {
- if (attemptChallenge()) {
- clearInterval(intervalId);
- }
- }, 2000);
- setTimeout(() => {
- clearInterval(intervalId);
- observer.disconnect();
- }, 60000);
- }
- function handleChallenge() {
- if (!attemptChallenge()) {
- setupObserver();
- setupInterval();
- }
- }
- handleChallenge();
- })();