Custom Google Search for Mturk

A new window will open and search the highlighted words and saved words.

目前為 2014-06-26 提交的版本,檢視 最新版本

// ==UserScript==
// @name       Custom Google Search for Mturk 
// @version    0.1
// @description  A new window will open and search the highlighted words and saved words.
// @description  Hit the + key to enter text to save. Highlight what you want to search and hit the ~ key.
// @description  Saved words are stored until overwritten.
// @author     Cristo
// @include       *
// @copyright  2012+, You
// @namespace https://gf.qytechs.cn/users/1973
// ==/UserScript==

document.addEventListener( "keydown", kas, false);
function kas(i) {
    if (i.keyCode == 192) {//~ Launchs Search  
    	launchIt();           
	}
    if (i.keyCode == 187) {//+ Adds terms
    	termsStore();            
    }
}
function termsStore() {
    var wordBank = prompt("Please enter search term to add");   
    GM_setValue("search term", wordBank);
}
function launchIt() {
	var lighted = window.getSelection().toString();
	window.open("http://www.google.com/search?q="+lighted+" " +GM_getValue("search term"));  
} 

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址