您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display all Petpets in the Petpet Lab Ray without a scrollbar
// ==UserScript== // @name Neopets Petpet Lab Ray Display // @namespace http://tampermonkey.net/ // @version 1.0 // @description Display all Petpets in the Petpet Lab Ray without a scrollbar // @include https://www.neopets.com/petpetlab.phtml // @grant none // ==/UserScript== (function() { 'use strict'; // Wait for the page to fully load window.onload = function() { // Target the specific table that contains the Petpets const petpetTable = document.querySelector('form > table > tbody'); // Adjust this selector as needed if (petpetTable) { petpetTable.style.display = 'grid'; petpetTable.style.gridTemplateColumns = 'repeat(5, 1fr)'; // 5 columns petpetTable.style.gap = '10px'; // Space between Petpets petpetTable.style.overflow = 'hidden'; // Remove existing unwanted styles petpetTable.querySelectorAll('tr').forEach(row => { row.style.display = 'contents'; // Make rows behave like a grid }); // Adjust Petpet cells const petpetCells = petpetTable.querySelectorAll('td'); petpetCells.forEach(cell => { cell.style.boxSizing = 'border-box'; // Include padding in width calculations cell.style.padding = '10px'; // Add some padding around each Petpet }); } }; })();