lolskill.net : link to others platforms

Add a direct link the targeted player on op.gg and lolking.net

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

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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        lolskill.net : link to others platforms
// @namespace   hideonScript
// @author      Tegomass
// @description Add a direct link the targeted player on op.gg and lolking.net
// @include     http://www.lolskill.net/top*
// @include     http://www.lolskill.net/champion/*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js
// @version     1.0
// @grant       GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a major design change introduced in GM 1.0,
    It restores the sandbox.
*/

$('th.tooltip:contains("LSS")').after('<th id="outLink">Links</th>');
$('#championsTable').find('tr').find('td:eq(5)').after('<td class="outLink" />');
$('#championsTable').find('tr').each(function() {
	var server = $(this).find('.realm.tooltip').text().toLowerCase();
	var serverTruncated = (server == 'kr') ? 'www' : server;
	var opgg = '<a href="http://' + serverTruncated + '.op.gg/summoner/userName=' + $(this).find('.summoner.left').text() + '">op.gg</a>';
	var lolking = '<a href="http://www.lolking.net/search?name=' + $(this).find('.summoner.left').text() + '">lolking</a>';
	$(this).find('.outLink').html(opgg + lolking)
	$('.outLink').css({fontSize: '10px'});
	$('.outLink a').css({display: 'inline-block'});
});