您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds "Stars" and "Watching" links, as well as your user profile link, to the header alongside the existing "Pull Requests", "Issues" and "Gist" links.
当前为
// ==UserScript== // @name Github.com - Extra header links // @namespace r-a-y/github/watching/homepage // @description Adds "Stars" and "Watching" links, as well as your user profile link, to the header alongside the existing "Pull Requests", "Issues" and "Gist" links. // @match https://github.com/* // @version 1.2.3 // @grant none // ==/UserScript== var nav, watchingLink, starLink, user, userLink; nav = document.querySelector('header nav'); watchingLink = document.createElement('a'); watchingLink.href = '/watching'; watchingLink.setAttribute( 'class', 'mr-lg-3' ); watchingLink.innerHTML = 'Watching'; starLink = document.createElement('a'); starLink.href = '/stars'; starLink.setAttribute( 'class', 'mr-lg-3' ); starLink.innerHTML = 'Stars'; user = document.querySelector('.header-nav-current-user .css-truncate-target').textContent; userLink = document.createElement('a'); userLink.href = '/' + user; userLink.setAttribute( 'class', 'mr-lg-3' ); userLink.innerHTML = user; nav.appendChild( starLink ); nav.appendChild( watchingLink ); nav.appendChild( userLink );