ShowMissingBadges

Show Missing Badges in Munzee

目前為 2023-05-03 提交的版本,檢視 最新版本

// ==UserScript==
// @name         ShowMissingBadges
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Show Missing Badges in Munzee
// @author       CzPeet
// @match        https://www.munzee.com/m/*/badges*
// @icon         https://munzee.global.ssl.fastly.net/images/pins/premium.png
// @grant        none
// @license      MIT
// ==/UserScript==

var categories;
var badgesObject;

function FillKnownBadges()
{
    ///Lists
    categories = ["all","daily-challenge","points","capture","mythological","pouch-creatures","deploy","modern-myths","munzee","garden-gnomes","zodiacs","player-awards","munzee-special","premium-membership","flamingos","munzee-mechz","mhq-visit","meet-greet","leaderboard","garden-hedges","clan","cubimals","social","gotm","destination","rover","eventzee-legacy","zeeops","event-host","event","fitness","munzpak","coinz"];
    badgesObject = [];

    var DailyChallenge = [
        { title: "1 Mil Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221017-3e7b72a70b0eca6ab05a4110c907afd4437e16630d6db969e4b6324.png", text: "Earn at least 1000000 points in a single day"},
        { title: "100 Green", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/100green.png", text: "Deploy at least 100 regular green Munzees in one day (MHQ time)"},
        { title: "100k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/100k.png", text: "Earn at least 100000 points in a single day"},
        { title: "10k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/10k.png", text: "Earn at least 10000 points in a single day"},
        { title: "1k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/1k.png", text: "Earn at least 1000 points in a single day"},
        { title: "250k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221017-3e868c91f079273faed59a1f64cf840779af36c1a0842b7828e5ec5.png", text: "Earn at least 250000 points in a single day"},
        { title: "25k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/25k.png", text: "Earn at least 25000 points in a single day"},
        { title: "5 by 5", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/5by5.png", text: "Capture exactly 5 motels or rooms, 5 diamonds, 5 greenies, 5 regular virtuals, and 5 regular mysteries in one day"},
        { title: "500k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221017-3b8aa1fcbee0cd51cdb6408398bf02d5609f76191442641fc70b792.png", text: "Earn at least 500000 points in a single day"},
        { title: "50k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/50k.png", text: "Earn at least 50000 points in a single day"},
        { title: "5k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/5k.png", text: "Earn at least 5000 points in a single day"},
        { title: "750k Day", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221017-c6ada4561272d4a11444d40b1e67d56be23ad2b0712013a20f876ac.png", text: "Earn at least 750000 points in a single day"},
        { title: "Air Munzee", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/jordan.png", text: "Capture & Deploy exactly 23 in one day"},
        { title: "AlternaMyth Wrangler", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/alternamythwrangler.png", text: "Capture all 4 of the original AlternaMyth Munzees in one 24 hour day - based on MHQ time"},
        { title: "Broadside", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220804-c53889bf6920ec06aba855a97d47053f91190a2c336491c1bf2d789.png", text: "Capture 1 Water Mystery and 1 Pirate Sloop Racer Soap Box Derby special in a single MHQ day."},
        { title: "Christmas Cream3r", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221122-16407238ff62c82dc8cd6170a6de8a2800c5e9d534d3365657ebc01.png", text: "Capture 1 CarafeBorg and 1 Cow Evolution of any stage in a single MHQ Day."},
        { title: "Classical AlternaMyth Wrangler", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/clalternamythwrangler.png", text: "Capture all 4 of the Classical AlternaMyth Munzees in one 24 hour day - based on MHQ time"},
        { title: "Classical Myth Wrangler", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/mythwrangler18.png", text: "Capture all 4 Classical Mythological Munzees in one 24 hour day - based on MHQ time"},
        { title: "Clear The Board", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20210827-cbe3a7518765a35dca8eaf4f9b2cc39aae0123304aab5983c70d211.png", text: "Capture 8 Pawns, 2 Knights, 2 Bishops, 2 Rooks, 1 Queen and 1 King of the same color in a single MHQ day."},
        { title: "Creative Castling", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20210827-580a31f419b16b0693d51c18965f256498ef4bbc9f89a7a6ada0e49.png", text: "Capture one King and one Rook of the same color consecutively in a single MHQ day."},
        { title: "CTP", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220803-ad4ed75502f698868d31787fd773640547e5f6f40a8deee14ccff22.png", text: "Capture 1 Flat Disc Golf Basket and 1 Golf Places Munzee in a single MHQ Day."},
        { title: "Derry(berry), Maine", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221007-4bb4ae501763336f3c711cecf3c16c6c406b7e8860a92b5bbdef1a3.png", text: "Capture 1 Screaming Telegram Card and 1 Flat DHS in a single MHQ Day."},
        { title: "Disaster Dough", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221122-154030653dce9706d00a05b0c2e1f249f23374f589687cf79ce29a3.png", text: "Capture and break 1 GingerMech Man sitting in a GingerBounce House in a single MHQ Day."},
        { title: "Dyn0mite", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221122-a7e8814eabec984d4ea494961f4d835f15ce9ba725e5f7be53fad92.png", text: "Capture 1 Cybersaurus Rex and use a Blast Capture of any type in a single MHQ Day."},
        { title: "Forest Filter", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220420-11262ee3daa98e028000579f4e4ee3ec27e8195c9dfa158ad435dce.png", text: "Capture 1 Earth Mystery and 1 Recyclops Munzee in a single MHQ day."},
        { title: "Freezer Burn", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/freebu.png", text: "Get frozen by an Ice Munzee and burned by a Fire Munzee in the same day"},
        { title: "Fruit N1NJ4", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221122-c17ea9301bf0534674fd0029236426844c1d0d4706c4f71ca6154de.png", text: "Capture 1 TR33 T0PP3R and 1 Tree scatter of any type in a single MHQ Day."},
        { title: "Gold Nugget Rush", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220808-7fe0b99462f4664b2e6434a6bdd6c7ce582a613e42ed1f3ca44ecea.png", text: "Cap 1 Gold'n Coins RUMbot, 1 Premium Munzee, 1 Golden Four Leaf Clover and 1 Golden Feather in a single MHQ Day."},
        { title: "Grade School Student", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/npi1.png", text: "Earn exactly 314 points in one day."},
        { title: "Guac The Plank!", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220526-12dab38cc07567393199eeed94da057f38c34f078b1e7e693ea9cbb.png", text: "Capture 1 Robocado, 1 Tomato, 1 Catapult and 1 RUMbot of any type in a single MHQ day."},
        { title: "High Flyer", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220804-3996ed81e96640d6b7cc44c9c1307d9a16e9454fc798733c4ba2780.png", text: "Capture 1 Electric Mystery and 1 Office Trolley Racer Soap Box Derby special in a single MHQ day."},
        { title: "Holy M4CK3REL!", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220421-076681d4a0e0ad1f01afef2c5647f8e2e654f727c398589b69eea11.png", text: "Capture 1 M4CK3REL or KiNG M4CK3REL and 1 Faith Places Munzee in a single MHQ day."},
        { title: "Keepurrs of the Keys", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220511-2f7a1a2b609d11d54c9cf935450801744c012b475594d5c48835a56.png", text: "Cap 1 Flat Cats and 1 Lost Key in a single MHQ Day."},
        { title: "Leaving the Race", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220804-fcac31abe3225f634cc86ff3a0409c512d60390e64211616b3bf145.png", text: "Capture 1 Air Mystery and 1 Spy Car Racer Soap Box Derby special in a single MHQ day."},
        { title: "Legacy Pi", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/pi.png", text: "Earn exactly 314 points in one day"},
        { title: "Loose Wheel", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220804-f1d0489165ff155656276c14f2b74b9a5244dc0ad5c1a9121043bab.png", text: "Capture 1 Earth Mystery and 1 Basic Racer Soap Box Derby special in a single MHQ day."},
        { title: "Mallet Mates", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220623-9952f6ec26223e3f0872c43c194af298f4434ccd664faeb47236b23.png", text: "Capture a Mad Hatter Garden Gnome and a Garden Flamingo of any type in a single MHQ day."},
        { title: "Mission Impawssible", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220803-67bf1a82fb6ec055f2c088bfc6dc50befcd5fe0e2753d0370a654ee.png", text: "Capture 1 Flat Cats and the entire trail scattered from the Laser Pen Munzee in a single MHQ Day."},
        { title: "Mission Maker", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220511-e17f341e49fec3151c73f6d04536cee80ed64b72eb4ef13871fcf10.png", text: "Cap 1 Flat Typewriter and 1 Dossier in a single MHQ Day."},
        { title: "Movie Night", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220511-819885584add46db6db2f2698dfdeec25b1bdce0f42bb28eb7b46bb.png", text: "Cap 1 Flat DHS and 1 Reptoid Yeti in a single MHQ Day."},
        { title: "Murray Mummy", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220511-76b355cee71b307ac774124d87ab3eecf298e9ea8f1ad5d807fdbf6.png", text: "Cap 1 Flat Murray and 1 Anubis Egyptian Zodiac in a single MHQ Day."},
        { title: "Myth Wrangler", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/mythwrangler16.png", text: "Capture all 4 Mythological Munzees types in one 24 hour day - based on MHQ time"},
        { title: "O TENnenBOMB", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221121-94d06282debe66c8a80291a66601e72470e1d76f1e2d841c4f65348.png", text: "Capture 1 Treefolk Munzee and use 10 blasts of any type in a single MHQ day."},
        { title: "Outback O's", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220808-d4694430e2f5b8a38418e15ae76a8cc721c3d2279b7b0a1295541ef.png", text: "Cap 1 GeoLoggers RUMbot, 1 Safari Truck, 1 Personal Munzee and 1 Blue Mystery of any type in a single MHQ Day."},
        { title: "Pawn Promotion", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20210827-4b8a96ec07216b3a2828b34d9287c485d1d507380e834c1a981e8ac.png", text: "Capture 5 Pawns and one Bishop, Knight, Rook or Queen of the same color in a single MHQ day."},
        { title: "Potassium Partners", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220329-500a797d35d21fbe1e812e8ff5a8cecad4e502b1f6151c07430e998.png", text: "Capture 1 KiNG C0G and 1 BananaBorg in a single MHQ day."},
        { title: "Repeater", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/repeater.png", text: "Finish the day with a daily score that repeats. All numbers must be the same. Ex. 222, 4444. minimum 3 digits."},
        { title: "Road Chippers", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220808-341b155f1b678777ce7ce561f8c2375d7683fb1b47c27382daaa3ee.png", text: "Cap 1 SCGS RUMbot, 1 Laser Trail #1, 1 Post Office POI and 1 QRewzee in a single MHQ Day."},
        { title: "Shrieking Ace", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220511-a9c71a5726295c8b8576782e3fe98b15b9cd6d6a7505839de215837.png", text: "Cap 1 Flat Disc Golf Basket and 1 Banshee in a single MHQ Day."},
        { title: "Slippery Sprinters", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220329-a27ffc5f302cd7772160385f1dfe857c8a8e8aa71c4c9a822e1422b.png", text: "Capture 1 P33L scattered from a BananaBorg and 1 Urban Fit Munzee in a single MHQ day."},
        { title: "Smokescreen", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220804-f33b85c815a8d2cb6dd0a472fc0b78596d380cc04f3182ae4104bb9.png", text: "Capture 1 Fire Mystery and 1 Caboose on the Loose Racer Soap Box Derby special in a single MHQ day."},
        { title: "Sweet Dreams", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20230306-c9da5b7b66cff9fa5b8b6babaee0b18bc5f14cc35c41a7fdf8af9d3.png", text: "Capture 1 SleepZee and 1 Poppy scattered from the Winged Monkey in the same MHQ day."},
        { title: "Turbo Boost", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220804-7613bccdd0ae7712f412c9c2fa2449526fa0c97af8008413d08a5c4.png", text: "Capture 1 Void Mystery and 1 Rocket Racer Soap Box Derby special in a single MHQ day."},
        { title: "University Student", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/npi2.png", text: "Earn exactly 3141 points in one day."},
        { title: "Valor Bites", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220808-fdda2ce345531081e3771ab3798cc9c6f0dd50bca601b280763e406.png", text: "Cap 1 NEGS RUMbot, 1 Shield, 1 Longsword and 1 original Dragon Myth in a single MHQ Day."},
        { title: "Winter Wak3 Up Call", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20221122-b0b719d9efcd2e1cad6d55e501f6173eb67ebf41bf0660aa3bf871c.png", text: "Capture 1 Father TiM3 and 1 SleepZee in a single MHQ Day."},
        { title: "You Meddling Kids", src: "https://munzee.global.ssl.fastly.net/images/new_badges/small/20220511-be7c495e7b6c0224f9370f6407ef740efe6113aaec2093bbcff1fe9.png", text: "Cap 1 Flat Flashlight and 1 Hotel in a single MHQ Day."}
    ];

    badgesObject.push(null);
    badgesObject.push(DailyChallenge);

}

function DeleteMissingBadges()
{
    $( "IMG" ).each(function( index ) {
        if (this.src.indexOf("_null") >= 0)
        {
            this.parentElement.remove();
        }
    });
}

function MissingBadgeSelector(badgeType)
{
    let categoryID = categories.indexOf(badgeType);
    switch (categoryID)
    {
        case -1:
            //invalid
            break;
        case 0:
            //all
            break;
        default:
            //valid
            AddMissingBadges(categoryID);
            break;
    }
}

function AddMissingBadges(categoryID)
{
    let htmlContent = document.getElementsByTagName('html')[0].innerHTML;
    //Title
    var sideBar = $("#sidebar");
    var badgePlace = sideBar.siblings().first();

    var missingTitle = document.getElementsByClassName("badge-category")[0].cloneNode(true);
    missingTitle.textContent = "Missing " + missingTitle.textContent;
    missingTitle.style.color = "red";

    badgePlace.append(missingTitle);

    //Badges
    var missingBadgesContainer = document.createElement("UL");
    missingBadgesContainer.setAttribute("id","missing-badges-listing");
    missingBadgesContainer.setAttribute("class","list-inline");

    badgePlace.append(missingBadgesContainer);

    badgesObject[categoryID].forEach(function( index ) {
        if (htmlContent.indexOf(index.title) < 0)
        {
            let content = "";
            //Generate Badges
            let LI = document.createElement("LI");
            LI.setAttribute("class","badge-helper");
            //LI.setAttribute("data-container","body");
            //LI.setAttribute("data-toggle","popover");
            LI.setAttribute("data-toggle","tooltip");
            LI.setAttribute("data-placement","top");
            //LI.setAttribute("data-title",index.title);
            //content = "<section><p class='old-desc-if-earned'>"+index.text+"</p></section>";
            //LI.setAttribute("data-content",content);
            //LI.setAttribute("data-original-title","");
            //LI.setAttribute("title","");
            LI.setAttribute("title",index.text);
            LI.setAttribute("style", "margin: 24px 0 0; cursor: pointer; transition: all .3s ease-in; vertical-align: top; width: 135px");

            let IMG = document.createElement("IMG");
            IMG.setAttribute("src",index.src);
            LI.appendChild(IMG);

            let P = document.createElement("P");
            P.setAttribute("style","font-family: Ubuntu, sans-serif; font-weight: 300; font-style: italic; text-align: center; color: red");
            P.innerText = index.title;
            LI.appendChild(P);

            missingBadgesContainer.appendChild(LI);
        }
    });
}

function AfterLoaded()
{
    //Fill the BadgeObject
    FillKnownBadges();
    //delete all missing badges for better view
    DeleteMissingBadges();
    //add new chapter for missing badges
    var badgeType = location.pathname.split('/').at(-1);
    MissingBadgeSelector(badgeType);
}

document.loaded = AfterLoaded();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址