Bypass Google Sorry (reCAPTCHA)

Redirect Google reCAPTCHA to new search

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Bypass Google Sorry (reCAPTCHA)
// @version      1.0.0
// @description  Redirect Google reCAPTCHA to new search
// @author       lord_ne (modified from script by Ang Li)
// @include      *://www.google.*/sorry/*
// @grant        none
// @run-at       document-start
// @namespace https://greasyfork.org/users/230713
// ==/UserScript==

// Redirects Google Sorry page to a different search engine
// Original script: https://greasyfork.org/en/scripts/33226-bypass-google-sorry-recaptcha

function getParameterByName(name, url, decode) {
    name = name.replace(/[\[\]]/g, "\\$&");
    let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
    let results = regex.exec(url);
    if (!results) return null;
    if (!results[2]) return '';
    if (decode) {
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    } else {
        return results[2];
    }
}

(function() {
    'use strict';
    var searchEngineURL = "https://www.bing.com/search?q=";
    //var searchEngineURL = "https://duckduckgo.com/?q=";
    //var searchEngineURL = "https://search.yahoo.com/search?p=";
    //var searchEngineURL = "https://www.ecosia.org/search?q=";
    //var searchEngineURL = "https://www.lukol.com/s.php?q=";
    var googleSorryUrl = window.location.href;
    var targetDomain = getParameterByName('continue', googleSorryUrl, true);
    if(targetDomain.match("google")) {
        window.location.replace(searchEngineURL + getParameterByName('q', targetDomain, false));
    }
})();