Greasy Fork is available in English.

让新窗口打开都去见鬼(强制所有链接在当前页打开)

强制所有链接在本标签页打开,禁止新窗口打开页面

// ==UserScript==
// @name 让新窗口打开都去见鬼(强制所有链接在当前页打开)
// @namespace undefined
// @version 0.1
// @description 强制所有链接在本标签页打开,禁止新窗口打开页面
// @match https://*/*
// @match http://*/*
// @grant none
// @author JiGuang
// @license MIT
// @run-at document-end
// ==/UserScript==
document.body.addEventListener('mousedown', function (e) {
	e.target.target = '_self';
    e.target.parentNode.target='_self';
	e.target.parentNode.parentNode.target='_self';
	e.target.parentNode.parentNode.parentNode.target='_self';
	e.target.parentNode.parentNode.parentNode.parentNode.target='_self';
})
console.log('【旧标签页打开】已经运行成功');