🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

总在当前窗口加载新网页

适用于edge/chrome创建的网页应用,按自己的需求添加匹配网站

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         总在当前窗口加载新网页
// @namespace    https://greasyfork.org/zh-CN/scripts/418658-%E6%80%BB%E5%9C%A8%E5%BD%93%E5%89%8D%E7%AA%97%E5%8F%A3%E5%8A%A0%E8%BD%BD%E6%96%B0%E7%BD%91%E9%A1%B5
// @version      0.2
// @description  适用于edge/chrome创建的网页应用,按自己的需求添加匹配网站
// @author       neysummer2000
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @match        https://pan.baidu.com/*
// @match        https://www.bilibili.com/*
// @grant        none
// ==/UserScript==

(function(){

 var f_open = window.open;
 window.open = function(url){
    f_open(url, '_self');
    //   f_open(url, 'newwindow' + new Date().getTime().toString(), 'channelmode=1,fullscreen=1,height=1920, width=1080, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no,status=no');
}
$(document).on('click', 'a[target=_blank]', function(e){
    this.target="_self";
    });
})();