Last active
December 29, 2015 12:49
-
-
Save laomo/7673326 to your computer and use it in GitHub Desktop.
V2EX搜索 当前的搜索基于v2ex.com,所以由于子域名比较多,搜索记录会有很多重复。修改搜索基于当前访问的子域名,保证不重复。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name V2EX搜索 | |
// @namespace http://lmbj.net | |
// @description 当前的搜索基于v2ex.com,所以由于子域名比较多,搜索记录会有很多重复。修改搜索基于当前访问的子域名,保证不重复。 | |
// @include http://www.v2ex.com/* | |
// @version 0.2 | |
// ==/UserScript== | |
dispatch = function() { | |
var q = document.getElementById("q"); | |
if (q.value != "") { | |
window.open('http://www.google.com/search?q=site:'+window.location.host+'/t%20' + q.value, "_blank"); | |
} | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment