您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Set a keyboard shortcut for toggling the pencil tool on the NYT crossword
// ==UserScript== // @name NYT Crossword Pencil Keyboard Shortcut // @namespace com.isabelgk // @version 0.0.2 // @description Set a keyboard shortcut for toggling the pencil tool on the NYT crossword // @author Isabel Kaspriskie // @match https://www.nytimes.com/crosswords/* // @icon https://www.google.com/s2/favicons?sz=64&domain=mozilla.org // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; document.addEventListener('keydown', function(event) { // Check if the pressed keys match the desired shortcut (Ctrl + P) if (event.ctrlKey && event.keyCode === 'P'.charCodeAt(0)) { var element = document.querySelector('.xwd__toolbar_icon--pencil'); if (!element) { element = document.querySelector('.xwd__toolbar_icon--pencil-active'); } element.closest('button').click(); } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址