GitHub Your Fork

Shows a 'your fork is at' link below the title

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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 Your Fork
// @icon        https://github.com/eXistenZNL/userscripts/raw/master/icons/github.png
// @namespace   eXistenZNL
// @description Shows a 'your fork is at' link below the title
// @include     https://*github.com/*
// @version     1.0.5
// @grant       none
// @require     https://ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js
// ==/UserScript==

(function($) {
    if (0 === $('h1.entry-title').length) {
        console.warn('No header found with class "entry-title"');
        return;
    }
    if (0 !== $('h1.fork-flag').length) {
        console.warn('Already have a fork');
        return;
    }
    var username = String.trim($('a.name').attr('href')).substring(1);
    var repository = $('h1 strong a').html();
    var url = '/' + username + '/' + repository;
    $.get(
        url,
        function () {
            $('.entry-title').append('<span class="fork-flag"><span class="text">your fork is at <a href="' + url + '">' + username + '/' + repository + '</a></span></span>');
        }
    ).fail(function() {
       $('.entry-title').append('<span class="fork-flag"><span class="text">You dont have a fork (yet!)</span></span>');
    });
})(jQuery);