您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add option for Page Size of 256 in BlueCat Address Manager
// ==UserScript== // @name BlueCat Address Manager Page Size 256 // @namespace * // @description Add option for Page Size of 256 in BlueCat Address Manager // @include */app* // @version 3 // @grant none // @author Marius Galm // @copyright 2018, Marius Galm // @license MIT // @icon https://www.bluecatnetworks.com/wp-content/uploads/2018/03/cropped-bluecat-favicon-32x32.png // ==/UserScript== if (document.readyState === "interactive" ) { // where will we add var sels = document.getElementsByTagName("select"); var selects = []; var leng = sels.length; for ( var i = 0 ; i < sels.length ; i++ ) { // only into PageSize objects if (sels[i].hasAttribute("onchange")) { if (sels[i].getAttribute("onchange").includes("performChangePageSize")) { selects.push(sels[i]); } } } // what is pushed in var string = "256,512,1024"; var array = string.split(","); // do push for ( var j = 0 ; j < selects.length ; j++ ) { if(selects[j]){ for ( var k = 0 ; k < array.length ; k++ ) { var val = array[k]; var option = document.createElement("option"); option.text = val; option.value = val; selects[j].appendChild(option); } } } }