HWM_PrintBattleLinks

Меняет тексты ссылок на бои в протоколе на их адреса

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         HWM_PrintBattleLinks
// @namespace    Небылица
// @version      1.1
// @description  Меняет тексты ссылок на бои в протоколе на их адреса
// @author       Небылица
// @include      /^https{0,1}:\/\/((www|qrator)\.heroeswm\.ru|178\.248\.235\.15)\/pl_warlog.php.+/
// ==/UserScript==

(function() {
    "use strict";

    var links = document.querySelectorAll("a[href^='warlog.php']"),
        hostname = location.protocol + "//" + location.hostname + "/",
        i,
        maxI = links.length;
    for (i=0;i<maxI;i++){
        links[i].innerText = hostname + links[i].getAttribute("href").replace("warlog", "war") + "&lt";
    }
})();