rorden / Enlaces en ZSH-Update

// ==UserScript==
// @name     Enlaces en ZSH-Update
// @version  1
// @grant    none
// @include /^https?://.*:34100/.*/
// @license MIT
// ==/UserScript==

window.onload = function() {
  
  setTimeout(function() {
    var els = document.getElementsByClassName("text-900 font-medium text-xl uppercase overflow-hidden text-overflow-ellipsis");

    var basetls = "https://" + window.location.hostname;
    var base = "http://" + window.location.hostname;

    var links = {
      "nodeknxip": `${base}:49153/webclient`,
      "zaccess": `${basetls}:34010`,
      "zbms": `${basetls}:34020`,
      "zshapi": `${basetls}:34030`,
      "zshmail": `${basetls}:34040`,
    }

    for(var el of els) {
      if(links[el.textContent]) {
        el.innerHTML = `<a target="blank" href="${links[el.textContent]}">${el.textContent}</a>`;
      }
    }
  }, 500);
  
}