您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Quickly view pet pages in Neopets Pound
// ==UserScript== // @name View pet pages @ the pound! // @namespace http://tampermonkey.net/ // @version 1.1 // @description Quickly view pet pages in Neopets Pound // @author Moxsee // @match https://www.neopets.com/pound/adopt.phtml // @grant none // ==/UserScript== (function() { 'use strict'; // Function to add "View Pet" links function addViewPetLinks() { // Find all pet names and their corresponding IDs for (let i = 0; i < 3; i++) { // Assuming there are always 3 pets displayed const petDiv = document.getElementById(`pet${i}`); if (petDiv) { // Get the pet's name const petNameElement = document.getElementById(`pet${i}_name`); const petName = petNameElement ? petNameElement.textContent : ''; // Create a new link element const viewLink = document.createElement('a'); viewLink.href = `https://www.neopets.com/~${petName}`; // Update the URL to point to the pet page viewLink.textContent = 'View Pet'; viewLink.target = '_blank'; // Open in new tab viewLink.style.marginLeft = '10px'; // Add some space // Append the link to the pet's name petNameElement.parentNode.appendChild(viewLink); } } } // Run the function to add the links addViewPetLinks(); })();