右键双击关闭页面-Double-click to close the page

右键双击页面任意位置即可关闭当前页面(双击间隔350ms以内)

// ==UserScript==
// @name         右键双击关闭页面-Double-click to close the page
// @namespace    https://github.com/omoristation
// @version      0.4
// @description  右键双击页面任意位置即可关闭当前页面(双击间隔350ms以内)
// @author       omoristation
// @match        *://*/*
// @grant        window.close
// @license      MIT
// @run-at       document-start
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOQAAADkCAYAAACIV4iNAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE6WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpIiB4bXA6Q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gOCjGIUmk1b0dJ2DGtFOYq1KXxrUFikKMaVaCnahWa91fU0KhRCEuT/AxOG03JRqHF9AAAAAElFTkSuQmCC
// ==/UserScript==

(function() {
	var rightMouseup = 0;
	var lastRightClick = 0;
	onmouseup = function(e) {
		if (e.button == 2) {
			var currentTime = new Date().getTime();
			if (rightMouseup == 0) {
				rightMouseup++;
				lastRightClick = currentTime;
				setTimeout(function() {
					rightMouseup = 0;
				}, 350);
			} else {
				if (currentTime - lastRightClick > 150) {
					//alert("你点了右键");
					rightMouseup = 0;
					window.close();
				} else {
					rightMouseup = 0;
				}
			}
		}
	}
})();

QingJ © 2025

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