Link to F-Status

Turns the profile name on an F-List profile page into a link to the corresponding fstatus.stormweyr.dk page.

  1. // ==UserScript==
  2. // @name Link to F-Status
  3. // @namespace https://greasyfork.org/en/users/170364-cumgolem
  4. // @version 1.0
  5. // @description Turns the profile name on an F-List profile page into a link to the corresponding fstatus.stormweyr.dk page.
  6. // @author Cummy
  7. // @match https://www.f-list.net/c/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. var charnameElement = document.getElementsByClassName('charname')[0];
  16.  
  17. var linkElement = document.createElement("a");
  18. for (var i = 0, len = charnameElement.attributes.length; i < len; i++) {
  19. linkElement.setAttribute(charnameElement.attributes[i].name, charnameElement.attributes[i].value);
  20. }
  21. linkElement.href = "https://fstatus.stormweyr.dk" + '/c/' + charnameElement.innerText;
  22. linkElement.innerText = charnameElement.innerText;
  23.  
  24. charnameElement.replaceWith(linkElement);
  25. })();