Google Smart Verbatim Switch

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

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

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

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

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

您需要先安装一款用户脚本管理器扩展,例如 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";
       };
     };
   };
 };
    
})();