github链接新标签打开

github站内所有的链接都从新的标签页打开,而不从当前页面打开

目前为 2024-03-11 提交的版本。查看 最新版本

// ==UserScript==
// @name         github链接新标签打开
// @namespace    https://gf.qytechs.cn/
// @license      MIT
// @version      0.1
// @description  github站内所有的链接都从新的标签页打开,而不从当前页面打开
// @author       byhgz
// @match        *://github.com/*
// @require      https://code.jquery.com/jquery-3.5.1.min.js
// @require      https://gf.qytechs.cn/scripts/462234-message/code/Message.js?version=1170653
// @icon         https://github.githubassets.com/assets/apple-touch-icon-144x144-b882e354c005.png
// ==/UserScript==
'use strict';

console.log("进入到github页面了....");
const timeout = 500;
setInterval(() => {//github站内所有的链接都从新的标签页打开,而不从当前页面打开
    $("a[target!='_blank']").attr("target", "_blank");
}, timeout);

console.log("                   _ooOoo_\n" +
    "                  o8888888o\n" +
    "                  88\" . \"88\n" +
    "                  (| -_- |)\n" +
    "                  O\\  =  /O\n" +
    "               ____/`---'\\____\n" +
    "             .'  \\\\|     |//  `.\n" +
    "            /  \\\\|||  :  |||//  \\\n" +
    "           /  _||||| -:- |||||-  \\\n" +
    "           |   | \\\\\\  -  /// |   |\n" +
    "           | \\_|  ''\\---/''  |   |\n" +
    "           \\  .-\\__  `-`  ___/-. /\n" +
    "         ___`. .'  /--.--\\  `. . __\n" +
    "      .\"\" '<  `.___\\_<|>_/___.'  >'\"\".\n" +
    "     | | :  `- \\`.;`\\ _ /`;.`/ - ` : | |\n" +
    "     \\  \\ `-.   \\_ __\\ /__ _/   .-` /  /\n" +
    "======`-.____`-.___\\_____/___.-`____.-'======\n" +
    "                   `=---='\n" +
    "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
    "         佛祖保佑       永无BUG");

QingJ © 2025

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