Google Smart Verbatim Switch

Switches Google search to verbatim, but allows you to turn it off later.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name Google Smart Verbatim Switch
// @namespace https://github.com/sonofevil
// @description Switches Google search to verbatim, but allows you to turn it off later.
// @include http://www.google.*/webhp*
// @include https://www.google.*
// @include https://www.google.*/webhp*
// @include https://www.google.*
// @include https://encrypted.google.*/webhp*
// @include https://www.google.com/?gws_rd=ssl
// @version 0.1
// @run-at document-start
// 
// ==/UserScript==

(function () {
  // Only enable when Google.com is freshly loaded through normal means.
 if (window.location.href.indexOf("tbs=li:1") == -1){
   if (window.location.href.indexOf("source=") == -1){
     if (window.location.href.indexOf("sclient=") == -1){
       //use verbatim
       if (window.location.href.indexOf("q=") == -1){
         window.location+="?tbs=li:1";
       } else {
         window.location+="&tbs=li:1";
       };
     };
   };
 };
    
})();