您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
moves the 'GTA Mods' section to the top of the sidebar on GTAForums
// ==UserScript== // @name GTAForums: GTA Mods on top of the sidebar // @namespace ntauthority.me // @include http://gtaforums.com/* // @version 3 // @run-at document-start // @grant none // @require https://greasyfork.org/scripts/12228/code/setMutationHandler.js // @description moves the 'GTA Mods' section to the top of the sidebar on GTAForums // ==/UserScript== setMutationHandler(document, '#gtaf_leftNav + div', function(nodes) { this.disconnect(); const obj = jQuery('#gtaf_leftNav_inner li'); const values = Object.keys(obj).map(k => obj[k]); const i = values.findIndex(a => jQuery(a).text() == 'GTA Mods'); jQuery('<li><br/></li>').appendTo('#gtaf_leftNav_inner ul'); values.map((a, idx) => [a, idx]) .filter(a => a[1] <= i) .forEach(a => { if (a[1] < i) { jQuery(a[0]).appendTo('#gtaf_leftNav_inner ul'); } else if (a[1] == i) { jQuery(a[0]).find('br').remove(); } }); });