// ==UserScript== // @name ThreadsAtributesEditingTool // @name:ru Инструмент изменения атрибутов в нитках // @version 2.3 // @description The script allows you to bulk edit the attributes of embarcation and disembarcation at stops in the thread // @description:ru Скрипт позволяет осуществлять групповое редактирование атрибутов посадки и высадки у остановок в нитках транспорта // @author Nikita Yushkov // @match https://n.maps.yandex.ru/* // @namespace https://greasyfork.org/users/199854 // @downloadURL none // ==/UserScript== (function() { var body = []; var a = []; window.onload = function(){ var Interval = setInterval(function(){if(!((document.getElementsByClassName('nk-logo-view__img nk-logo-view__img_color_white')[0] === null) || (document.getElementsByClassName('nk-suggest_width_available')[0] === undefined)))f0();},10); function f0(){clearInterval(Interval); body = document.getElementsByTagName('body'); body[0].insertAdjacentHTML('beforeEnd','Атрибуты в нитках'); a = document.getElementsByClassName('nk-transport-thread-stop-editor-view__stop'); document.getElementById('but').onclick = f1;} } function f1(){ if((a[0] === null) || (a[0] === undefined))alert('Остановки не найдены'); else{document.getElementById('but').parentNode.removeChild(document.getElementById('but')); body[0].insertAdjacentHTML('beforeEnd','
');};document.getElementById('ex').onclick = f2; document.getElementById('jdi').onclick = f3; document.getElementById('th1').onkeypress=function(e){ if(e.keyCode==13){ f3(); } }; document.getElementById('th2').onkeypress=function(e){ if(e.keyCode==13){ f3(); } }; var th3 = document.getElementsByName('th3'); for (var i = 0; i