您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在百度搜索页面可以使用Ctrl+Q 快速聚焦搜索框,在其他页面可在右下角显示当前日期和时间。
当前为
// ==UserScript== // @name 快速聚焦在百度搜索页面可以使用Ctrl+Q 快速聚焦搜索框,在其他页面可在右下角显示当前日期和时间 // @namespace http://tampermonkey.net/ // @version 0.3 // @description 在百度搜索页面可以使用Ctrl+Q 快速聚焦搜索框,在其他页面可在右下角显示当前日期和时间。 // @author wulei // @include * // @match https://www.baidu.com/** // @icon https://www.google.com/s2/favicons?sz=64&domain=baidu.com // @grant none // @license MIT // // ==/UserScript== (function() { 'use strict'; 'esversion:6'; if(window.parent!==window)return; var fg = document.createDocumentFragment(); var div = document.createElement("div"); div.onselectstart = () => false setInterval(() => { var date = new Date(), year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), week = date.getDay(), hour = date.getHours(), minute = date.getMinutes(), second = date.getSeconds(); div.innerText = `${year}年${month}月${day}日 ${hour}时${minute}分${second}秒 周${week}` }, 1000); div.setAttribute("class", "qf-date"); fg.appendChild(div); document.body.appendChild(fg); //聚焦搜索框 var arr = []; document.onkeydown = function (event) { arr.push(event.key) if (arr.toString().toUpperCase() === 'CONTROL,Q') { var is = false; Array.from(document.querySelectorAll("input")) .forEach((item) => { if (item.type === "text" && !is) { item.focus(); is = true } }) } } document.onkeyup = function () { arr.length = 0; } // Your code here... })(); (function (){ var style=document.createElement("style") style.innerHTML=`.qf-date { position: fixed; bottom: 3px; right: 3px; color: rgba(37, 134, 151, 0.281); color: red; font-size: 11px; font-weight: bold; /* zoom: 0.5; */ z-index: 999; } `; document.head.appendChild(style) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址