您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
导航栏增加Home、Repo、Discover、Trending、Topics、Stars
当前为
// ==UserScript== // @name Github Navigation Bar For Self // @version 1.0 // @description 导航栏增加Home、Repo、Discover、Trending、Topics、Stars // @author windnight // @include /^https?://((blog|gist|guides|help|raw|status|developer)\.)?github\.com/((?!generated_pages\/preview).)*$/ // @include /^https://*.githubusercontent.com/*$/ // @include /^https://*graphql-explorer.githubapp.com/*$/ // @require https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js // @run-at document-end // @namespace https://greasyforks.org/users/222560 // ==/UserScript== var $ = $ || window.$; window.jQuery = $; $(document).ready(function(){ $('.flex-items-center .header-nav-item').remove(); var profile = $('.header-nav-current-user .user-profile-link').attr('href'); $('nav').filter(".d-flex").append(` <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="`+ profile +`">Home</a> <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="https://github.com//guanguans?tab=repositories">Repo</a> <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="https://github.com//discover">Discover</a> <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="https://github.com//trending">Trending</a> <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="https://github.com//topics">Topics</a> <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="/guanguans?tab=stars">Stars</a> <a class="js-selected-navigation-item Header-link mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15" href="https://gist.github.com">Gist</a> `); });