您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Добавляет фильтр в окно снабжения
当前为
// ==UserScript== // @name Virtonomica: фильтр в окне снабжения // @namespace virtonomica // @version 1.0 // @description Добавляет фильтр в окно снабжения // @include http://*virtonomic*.*/*/window/unit/supply/multiple/vendor:*/product:*/brandname:* // ==/UserScript== var run = function() { var win = (typeof(unsafeWindow) != 'undefined' ? unsafeWindow : top.window); $ = win.$; var filterByCountry = '<option value="0"> </option>'; var filterByRegion = '<option value="0"> </option>'; var filterByTown = '<option value="0"> </option>'; var filterByUnitType = '<option value="0"> </option>'; $('table[class="list"] > tbody > tr > td:nth-child(2)').each(function(){ var row = $(this); filterByRegion = filterByRegion + '<option>'+row.text()+'</option>'; }); var types = new Array(); $('table[class="list"] > tbody > tr > td:nth-child(3) > a:nth-child(2)').each(function(){ var row = $(this); var type = row.text(); var matches = row.text().match(/\(([^)]+)\)$/); if(matches != null && matches.length > 1){ type = matches[1]; } types[type] = 1; }); for (key in types) { filterByUnitType = filterByUnitType + '<option>'+key+'</option>'; } // $('table[class="list"]').first().before('<select id="filterByUnitType">'+filterByUnitType+'</select>'); $('#filterByUnitType').change( function(){ var search = $(this).val(); $('table[class="list"] > tbody > tr > td:nth-child(3) > a:nth-child(2)').each(function() { var row = $(this); var matches = row.text().match(/\(([^)]+)\)$/); if (search == '0' || row.text() == search || (matches != null && matches[1] == search) ){ $(this.parentNode.parentNode).show(); } else { $(this.parentNode.parentNode).hide(); } }); }); } if(window.top == window) { var script = document.createElement("script"); script.textContent = '(' + run.toString() + ')();'; document.documentElement.appendChild(script); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址