您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Backspace key = "go back" as it was before Chrome 52
当前为
// ==UserScript== // @name Backspace goes back // @include * // @description Backspace key = "go back" as it was before Chrome 52 // @version 1.1.0 // @author wOxxOm // @namespace wOxxOm.scripts // @license MIT License // @run-at document-start // ==/UserScript== document.addEventListener('keyup', e => { if (e.which !== 8 || e.altKey || e.shiftKey || e.metaKey || e.ctrlKey) { return; } let el = document; while (el && (el = el.activeElement)) { if (el.isContentEditable || el.localName == 'input' && /^(text|color|date*|email|month|number|password|range|search|tel|time|url|week)$/.test(el.type) || el.localName == 'textarea') { return; } el = el.shadowRoot; } history.back(); e.preventDefault(); });