stdOpt

Добавляет ники к именам и фамилиям

اعتبارا من 13-10-2017. شاهد أحدث إصدار.

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 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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         stdOpt
// @namespace    MaxLevs
// @version      1.0.0
// @description  Добавляет ники к именам и фамилиям
// @author       MaxLevs
// @match        *://stdband.ru/release/*
// @grant        none
// @noframes
// @run-at document-idle
// ==/UserScript==

(function(w) {
    "use strict";
    let band = [
        {name:"Татьяна", lname: "Борзова", nick: "Torgil"},
        {name:"Ирина", lname: "Зиновкина", nick: "Ester"},
        {name:"Сергей", lname: "Кубасян", nick: "Cuba77"},
        {name:"Анна", lname: "Мосолова", nick: "LeeAnnushka"},
        {name:"Полина", lname: "Ртищева", nick: "Demetra"},
        {name:"Александр", lname: "Русаков", nick: "BalFor"},
        {name:"Влад", lname: "Токарев", nick: "Дуров"},
        {name:"Давид", lname: "Петросян", nick: ""}
    ];

    let db = [];
    for (let beaver of band) {
        if (beaver.nick)
            db[`${beaver.name} ${beaver.lname}`] = `${beaver.name} (${beaver.nick}) ${beaver.lname}`;
    }

    let target = document.getElementById("dle-content").querySelectorAll('.row>.col-8>b');
    for (let path of target) {
        if (~path.innerHTML.search(/Актёры озвучания:/)){
            target = path;
            break;
        }
    }

    target = target.nextSibling;
    while(target && target.tagName !== "BR"){
        if (db[target.innerText])
            target.innerText = db[target.innerText];
        target = target.nextSibling;
    }
})(window);