Github Repository Active Forks

Adds a button to search for active forks of the original Github repository on techgaun.github.io

当前为 2020-03-21 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         	Github Repository Active Forks
// @description		Adds a button to search for active forks of the original Github repository on techgaun.github.io
// @namespace    	iamMG
// @version     	1.0
// @icon
// @include        	/https?:\/\/github\.com\/.+\//
// @author       	iamMG
// @run-at			document-end
// @grant        	GM.openInTab
// @copyright		2020, iamMG (https://openuserjs.org/users/iamMG)
// @license 		MIT
// ==/UserScript==

(function() {
    'use strict';
	var kid = document.createElement("div");
	kid.classList.add("btn-with-count");
	kid.innerHTML = '<a class="btn btn-sm" title="Search for active forks">Active Forks</a>';
	var url = window.location.href;
	if (document.getElementsByClassName('fork-flag')[0]) { url = document.getElementsByClassName('fork-flag')[0].getElementsByTagName('a')[0].href };
	kid.addEventListener('click', function() { window.open("https://techgaun.github.io/active-forks/index.html#" + url); });
	document.getElementsByClassName('pagehead-actions')[0].appendChild(kid);
})();