Greasy Fork 还支持 简体中文。

lolskill.net : link to others platforms

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

  1. // ==UserScript==
  2. // @name lolskill.net : link to others platforms
  3. // @namespace hideonScript
  4. // @author Tegomass
  5. // @description Add a direct link the targeted player on op.gg and lolking.net
  6. // @include http://www.lolskill.net/top*
  7. // @include http://www.lolskill.net/champion/*
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js
  9. // @version 1.0
  10. // @grant GM_addStyle
  11. // ==/UserScript==
  12. /*- The @grant directive is needed to work around a major design change introduced in GM 1.0,
  13. It restores the sandbox.
  14. */
  15.  
  16. $('th.tooltip:contains("LSS")').after('<th id="outLink">Links</th>');
  17. $('#championsTable').find('tr').find('td:eq(5)').after('<td class="outLink" />');
  18. $('#championsTable').find('tr').each(function() {
  19. var server = $(this).find('.realm.tooltip').text().toLowerCase();
  20. var serverTruncated = (server == 'kr') ? 'www' : server;
  21. var opgg = '<a href="http://' + serverTruncated + '.op.gg/summoner/userName=' + $(this).find('.summoner.left').text() + '">op.gg</a>';
  22. var lolking = '<a href="http://www.lolking.net/search?name=' + $(this).find('.summoner.left').text() + '">lolking</a>';
  23. $(this).find('.outLink').html(opgg + lolking)
  24. $('.outLink').css({fontSize: '10px'});
  25. $('.outLink a').css({display: 'inline-block'});
  26. });