gitee codes

开启gitee codes

  1. // ==UserScript==
  2. // @name gitee codes
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 开启gitee codes
  6. // @author You
  7. // @match https://gitee.com/*
  8. // @icon https://gitee.com/assets/favicon.ico
  9. // @grant none
  10. // @license Apache 2
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. $(document).ready(() => {
  17. let parent = $(".ui.secondary.pointing.menu");
  18. if (parent != null && parent.children().length > 0) {
  19. let first = $(parent.children()[0]).text();
  20. if(first == "\n概览\n") {
  21. let arr = location.pathname.split("/");
  22. let active = arr.length == 3 && arr[2] == "codes";
  23. $(".ui.secondary.pointing.menu").append(`
  24. <a class="item project ${active? "active":""}" href="/${arr[1]}/codes"><i class="iconfont icon-code"></i>
  25. codes
  26. </a>
  27. `)
  28. }
  29. }
  30. });
  31.  
  32. // Your code here...
  33. })();

QingJ © 2025

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