HWM_NewLotLinkInMenu

Добавляет ссылку на выставление нового лота в меню "Персонаж"

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         HWM_NewLotLinkInMenu
// @namespace    Небылица
// @version      1.1
// @description  Добавляет ссылку на выставление нового лота в меню "Персонаж"
// @author       Небылица
// @include      /^https{0,1}:\/\/((www|qrator)\.heroeswm\.ru|178\.248\.235\.15)\/.+/
// @exclude      /^https{0,1}:\/\/((www|qrator)\.heroeswm\.ru|178\.248\.235\.15)\/(login|war|cgame|campaign|frames|chat|chatonline|ch_box|chat_line|ticker|chatpost)\.php.*/
// ==/UserScript==

(function() {
    "use strict";

    // определяем элемент li "Рынок" и массив дочерних элементов
    var auctionLi = document.querySelector("li a[href='auction.php']").parentNode,
        auctionLiChildren = auctionLi.childNodes;

    // добавляем плюсик
    auctionLi.innerHTML += "<a href='auction_new_lot.php' title='Выставить новый лот'><b>+</b></a>";

    // задаём стили для ссылок на рынок и на выставление нового лота
    auctionLiChildren[0].style.display = "inline";
    auctionLiChildren[0].style.padding = "2px 6px 2px 9px";

    auctionLiChildren[1].style.display = "inline";
    auctionLiChildren[1].style.padding = "2px 0px 2px 0px";
})();