您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script adds a Next and Previous button to the Attack Logs page.
// ==UserScript== // @author Xiphias[187717] // @name Torn City - Attack Logs extension // @description This script adds a Next and Previous button to the Attack Logs page. // @include http://www.torn.com/attacklogs.php* // @include http://torn.com/attacklogs.php* // @include https://www.torn.com/attacklogs.php* // @include https://torn.com/attacklogs.php* // @version 1.0.0 // @namespace https://gf.qytechs.cn/users/3898 // ==/UserScript== $(document).ready(function() { runScript(); }); function addButtons(currentUserID) { var prevUserID = Number(currentUserID) - 1; var nextUserID = Number(currentUserID) + 1; var before = '<a href="/attacklogs.php?ID=' + (prevUserID) + '" style="float: left;"> < Previous</a>'; var after = '<a href="/attacklogs.php?ID=' + (nextUserID) + '" style="float: right;">Next > </a>'; $('center > a[href="events.php"]').before(before); $('center > a[href="events.php"]').after(after); } function runScript() { var currentUserID = getUserID(); addButtons(currentUserID); } function getUserID() { var path = window.location; var search = path.search; var userID = search.substring(search.indexOf('ID=')+3); return userID; }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址