您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Simple script to search google for results of a selected text with shortcut or hotkey Ctrl+Q (like ctrl+query). The mechanism is the same as the "Search Google for ..." in the right click menu
// ==UserScript== // @name Search Selected text on Google with Ctrl+Q shortcut // @copyright 2021 - Balazs Zubak // @description Simple script to search google for results of a selected text with shortcut or hotkey Ctrl+Q (like ctrl+query). The mechanism is the same as the "Search Google for ..." in the right click menu // @version 1.2 // @namespace * // @include * // @website https://gf.qytechs.cn/en/scripts/428030-search-selected-text-on-google-with-ctrl-q-shortcut // ==/UserScript== document.addEventListener("keyup", function(e){ // get selected text var seltext = getSelectedText(); if(seltext && e.code == "KeyQ" && e.ctrlKey) { window.open('http://www.google.co.in/search?hl=en&q='+seltext , '_blank'); } }); function getSelectedText() { // For Firefox, Safari and other non-IE browsers if(window.getSelection) { return window.getSelection(); } else if(document.getSelection) { return document.getSelection(); } else { // For IE var selection = document.selection && document.selection.createRange(); if(selection.text) { return selection.text; } return false; } return false; }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址