您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Always keep an eye on the latest activity of your favorite projects
当前为
// ==UserScript== // @name GitHub Latest // @namespace https://github.com/Ede123/userscripts // @version 0.9 // @description Always keep an eye on the latest activity of your favorite projects // @icon https://raw.githubusercontent.com/Ede123/userscripts/master/icons/GitHub.png // @author Eduard Braun <[email protected]> // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html // @include https://github.com/* // @grant none // ==/UserScript== // redirect link to automatically sort "your stars" by "recently active" document.body.addEventListener('mousedown', function(e){ var targ = e.target || e.srcElement; if ( targ && targ.href && targ.href.match(/\/stars$/) ) { targ.href = targ.href.replace(/\/stars$/, "/stars?sort=updated"); } }); // add a button to "latest issues" function addLatestButton() { var reponav = document.getElementsByClassName("reponav"); if (reponav && (reponav = reponav[0])) { var button = reponav.children[1].cloneNode(true); button.href += "?sort=updated"; button.style.float = "right"; button.firstElementChild.className = "octicon octicon-flame"; button.removeChild(button.lastElementChild); button.normalize(); button.lastChild.textContent = " Latest issues" button.removeAttribute("data-selected-links"); button.classList.remove("selected"); reponav.appendChild(button); } } addLatestButton(); // GitHub uses pjax to navigate between documents unsafeWindow.$(document).on("pjax:success", function() { addLatestButton(); });