Greasy Fork is available in English.

Redirect To Google

Fuck default baidu.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Redirect To Google
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Fuck default baidu.
// @author       Hnayan
// @match        *://www.baidu.com/s?wd=*
// ==/UserScript==

(function() {
    'use strict';
    //Just use '=' to split it,because all '=' in query's inside will convert to '%D3',as same as blank will convert.
    //So don't think about 'wd=bla=blah=bl3' and 'hello world'.
    const query = window.location.search.split('=')[1];
    const googleSite = `https://www.google.com.hk/search?q=${query}`;
    //I don't want to see baidu's page
    const mask = document.createElement("div");
    mask.id = 'maskk';
    mask.style = 'position:absolute;width:100%;height:100%;z-index:9999;left:0;top:0;background-color:gray;opacity:0.95;';
    document.body.appendChild(mask);
    //open in current tab
    const virtualButton=document.createElement("a");
    virtualButton.setAttribute('href', googleSite);
    virtualButton.click();
})();