您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds total Lore collected so far to the Lore button in the sidebar when Lore is selected.
当前为
// ==UserScript== // @name Nexus Clash: Lore Counter // @namespace http://nexusclash.com/wiki/index.php/user:xensyria // @version 1.0 // @description Adds total Lore collected so far to the Lore button in the sidebar when Lore is selected. // @match http://*.nexusclash.com/modules.php?name=Game* // @copyright PD // ==/UserScript== var sideBars = document.getElementsByName('sidebar'); for (var i = 0; i < sideBars.length; i++){ if (sideBars[i].value == 'Lore'){ var possibleLore = sideBars[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling.firstChild.textContent if (possibleLore.match(/^(\n\s*\d{1,2}\.\s*[a-z ,\?\-:\.\;]+)+\s*$/i)){ sideBars[i].nextSibling.value = 'Lore (' + possibleLore.match(/\n\s*\d{1,2}\.\s*[A-Za-z ,\?\-:\.\;]+/g).length + '/50)'; } } }