您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a releases button
- // ==UserScript==
- // @name Github: Add Releases Button
- // @namespace https://github.com/phracker
- // @version 0.1.7
- // @description Adds a releases button
- // @require https://code.jquery.com/jquery-latest.min.js
- // @include http*://*github.com/*/*
- // ==/UserScript==
- // var releasesButton = document.evaluate('/html/body/div[1]/div[3]/div[3]/div[1]/div[1]/div[1]/div/ul[1]/li[4]',document,null,9,null).singleNodeValue.cloneNode(true);
- var releasesButton = $('body > div.wrapper > div.site > div.container > div.repository-with-sidebar.repo-container.new-discussion-timeline.with-full-navigation > div.repository-sidebar.clearfix > nav > ul > li')[0].cloneNode(true);
- releasesButton.setAttribute('aria-label','Releases');
- var a = releasesButton.getElementsByTagName('a').item(0);
- a.href = a.href + '/releases';
- a.setAttribute('aria-label','Releases');
- a.setAttribute('data-hotkey','g r');
- a.setAttribute('class','sunken-menu-item');
- // a.setAttribute('data-selected-links',a.getAttribute('data-selected-links').replace('repo_wiki','repo_releases').replace(/wiki$/,'releases'));
- a.getElementsByClassName('full-word').item(0).textContent = 'Releases';
- a.getElementsByTagName('span').item(0).setAttribute('class','octicon octicon-rocket');
- // var menu = document.evaluate('/html/body/div[1]/div[3]/div[3]/div[1]/div[1]/div[1]/div/ul[1]',document,null,9,null).singleNodeValue;
- var menu = $('body > div.wrapper > div.site > div.container > div.repository-with-sidebar.repo-container.new-discussion-timeline.with-full-navigation > div.repository-sidebar.clearfix > nav > ul')[0];
- menu.appendChild(releasesButton);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址