MyMunzeeProfile

my Munzee profile script

2014-12-20 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        MyMunzeeProfile
// @namespace   MyMunzeeProfile
// @include     http://www.munzee.com/m/*
// @version     1.0.0
// @grant       none
// @description my Munzee profile script
// ==/UserScript==

jQuery(document).ready(function ($) {
  function handleBatches() {
    var badges = {
      achievements: {
        description: 'Achievement badges', 
        titles: [
          'Perfect 10', 'Over The Hill', 'Centurion', 
          '1k Day', '5k Day', '10k Day', '25k Day', 
          '#1', 'Top 10', 'Top 50', 'Top 100', 
          'Winner', 'First Loser', 'Lucky', 'Unlucky',
          'Rover Walker', 'Rover Mover', 'Rover Transporter', 
          'Easy as Pi'
        ]
      },
      captures: {
        description: 'Capture badges', 
        titles: [
          'Seeker', 'Capture Streak', 'First Responder', 'Sampler', 'ROY G BIV', 
          'It\\\'s a Blast!', 'Dirty Dozen', 
          'Hunter', 'Collector', 'Hoarder', 'Curator', 'Historian', 
          '5 by 5', 
          'Breakfast', 'Wifi', 'Pool'
        ]
      },
      deploys: {
        description: 'Deploy badges', 
        titles: [
          'Hider', 'Deploy Streak', 'Super Streak', 
          'Air Munzee', '5 by 5 deployed', '100 Green', 
          'Virtual High 5', 'Watson', 'Holmes', 
          'VardemInn', 'Foster\\\'s Palace', 'Founders\\\' Towers'
        ]
      },
      battle: {
        description: 'Battle badges', 
        titles: [
          'Clan Gold', 'Clan Silver', 'Clan Bronze',
          'Battle Ready', 'Warrior', 'Combat Chuck', 'SuperChuck'
        ]
      },
      socials: {
        description: 'Social badges', 
        titles: [
          'Social Caterpillar', 'Social Cocoon', 'Social Butterfly', 'Social Princess', 'Social Queen', 
          'Social Tadpole', 'Social Froglet', 'Social Frog', 'Social Prince'
        ]
      },
      munzee: {
        description: 'Munzee special badges', 
        titles: [
          'Early Bird', 'Munzee HQ', 'MHQ Badge', 
          'Grand Opening', 'Munzee Marketplace', 'Behind the Wall', 
          'Player Of The Week', 'Meet the Makers', 'Reseller', 
          'MHQ Bash 2014', 'Worlds Collide MHQ', 'Munzee Garden'
        ]
      }
    };
                
    $('#badges-listing').prepend('<div class="page-header" id="badges-listing-all"><h2><small>Other badges</small></h2></div>');
    
    $.each(badges, function (key, data) {
      var category = '<div class="page-header" style="padding-bottom: 5px; margin: 10px 0px 0px" id="badges-listing-' + key + '">' +
                     '<h2 style="margin: 0px 0px 0px;"><small>' + data['description'] + '</small></h2></div>';
      for(var i = data['titles'].length - 1; i >= 0; i--) {
        var badge = $("li.badge-helper[data-title='" + data['titles'][i] + "']");
        if ($(badge).length != 0) {
          if (category != '') {
            $('#badges-listing-all').before(category);
            category = '';
          }
          $('#badges-listing-' + key).after(badge);
        }
      }
    });
  }
  
  if (window.location.href.substring(window.location.href.length - 8) == '/badges/') {
    handleBatches()
  }
});