GitHub Trending

添加 GitHub Trending 入口

  1. // ==UserScript==
  2. // @name GitHub Trending
  3. // @version 0.2
  4. // @description 添加 GitHub Trending 入口
  5. // @author hustcc
  6. // @match http://*.github.com/*
  7. // @match https://*.github.com/*
  8. // @run-at document-end
  9. // @namespace https://atool.vip
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const el = document.querySelector('body > div.position-relative.js-header-wrapper > header > div > div.HeaderMenu.d-lg-flex.flex-justify-between.flex-auto > nav > ul');
  16. if (el) {
  17. el.innerHTML = el.innerHTML + `<li><a class="js-selected-navigation-item HeaderNavlink px-2" data-selected-links="/trending" href="/trending">Trending</a></li>`;
  18. }
  19. })();