Greasy Fork is available in English.

Neopets - Daily Quest Helper

Adds a link to daily quests if available

// ==UserScript==
// @name         Neopets - Daily Quest Helper
// @namespace    neopets
// @author       blast me snowdaddy
// @description  Adds a link to daily quests if available
// @match         *://*.neopets.com/questlog/
// @grant        none
// @version 1.0
// ==/UserScript==

(function() {
    'use strict';

    // Function to create a link
    function createLink(url, name = 'Link') {
        const link = document.createElement('a');
        link.href = url;
        link.target = '_blank';
        link.style.marginLeft = '5px';
        link.style.textDecoration = 'underline';
        link.textContent = `[${name}]`;
        return link;
    }

    // Loop through all elements with the class 'ql-quest-description'
    const questDescriptions = document.querySelectorAll('.ql-quest-description');
    questDescriptions.forEach(desc => {
        if (desc.textContent.includes("Customise one of your Neopets")) {
            const link = createLink('https://www.neopets.com/customise/');
            desc.appendChild(link);
        } else if (desc.textContent.includes("Play any Game or Classic Game in the Games Room")) {
            const link = createLink('https://www.neopets.com/games/h5game.phtml?game_id=1310');
            desc.appendChild(link);
        }
        /**
        If you want to add more links to a quest, do what I did below here:
        */
        else if (desc.textContent.includes("Purchase item(s) from any Neopian Shop")) {
            const link = createLink('https://www.neopets.com/objects.phtml?type=shop&obj_type=14');
            const link2 = createLink('https://www.neopets.com/faerieland/springs.phtml');
            desc.appendChild(link);
            desc.appendChild(link2);
        }
        else if (desc.textContent.includes("Wheel of Mediocrity")) {
            const link = createLink('https://www.neopets.com/prehistoric/mediocrity.phtml');
            desc.appendChild(link);
        }
        else if (desc.textContent.includes("Wheel of Excitement")) {
            const link = createLink('https://www.neopets.com/faerieland/wheel.phtml');
            desc.appendChild(link);
        } else if (desc.textContent.includes("Wheel of Knowledge")) {
            const link = createLink('https://www.neopets.com/medieval/knowledge.phtml');
            desc.appendChild(link);
        }
        else if (desc.textContent.includes("Wheel of Misfortune")) {
            const link = createLink('https://www.neopets.com/halloween/wheel/index.phtml');
            desc.appendChild(link);
        }
        else if (desc.textContent.includes("Groom one of your Neopets with any grooming item")) {
            const link = createLink('https://www.neopets.com/inventory.phtml', 'Inventory');
            const link2 = createLink('https://www.neopets.com/safetydeposit.phtml?obj_name=&category=10', 'SDB');
            desc.appendChild(link);
            desc.appendChild(link2);
        }

    });
})();