Neopets Quick Quests

Open specific Neopets pages by right-clicking on quest descriptions or task descriptions.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Neopets Quick Quests
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  Open specific Neopets pages by right-clicking on quest descriptions or task descriptions.
// @author       BandanaWaddleDee24
// @match        *://www.neopets.com/*
// @grant        none
// @license MIT

// ==/UserScript==

(function () {
    'use strict';

    document.addEventListener('contextmenu', (event) => {
        const target = event.target;

        if (!target || (!target.classList.contains('ql-quest-description') && !target.classList.contains('ql-task-description'))) {
            return;
        }

        let url = null;

        switch (target.textContent.trim()) {
            case 'Purchase Item(s)':
                url = 'https://www.neopets.com/generalstore.phtml?store_type=';
                break;
            case 'Spin the Wheel of Mediocrity':
                url = 'https://www.neopets.com/prehistoric/mediocrity.phtml';
                break;
            case 'Spin the Wheel of Excitement':
                url = 'https://www.neopets.com/faerieland/wheel.phtml';
                break;
            case 'Spin the Wheel of Knowledge':
                url = 'https://www.neopets.com/medieval/knowledge.phtml';
                break;
            case 'Spin the Wheel of Monotony':
                url = 'https://www.neopets.com/prehistoric/monotony.phtml';
                break;
            case 'Spin the Wheel of Misfortune':
                url = 'https://www.neopets.com/halloween/wheel/index.phtml';
                break;
            case 'Customise your Neopet':
                url = 'https://www.neopets.com/customise/?view=BlueowPenguin';
                break;
            case 'Play a game':
                url = 'https://www.neopets.com/games/h5game.phtml?game_id=1391';
                break;
            case 'Feed a Pet':
            case 'Feed your Neopet':
            case 'Groom a Pet':
                url = 'https://www.neopets.com/home/';
                break;
        }

        if (url) {
            event.preventDefault(); 
            window.open(url, '_blank');
        }
    });
})();