Github Repository Active Forks

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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.1
// @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 = document.getElementsByClassName('mr-2 flex-self-stretch')[0].getElementsByTagName('a')[0].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);
})();