Redeem Picker

Continuous Redeem Page

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Redeem Picker
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Continuous Redeem Page
// @author       CzPeet
// @match        https://www.munzee.com/redeem*
// @icon         https://www.google.com/s2/favicons?domain=munzee.com
// @grant        none
// @license      MIT
// ==/UserScript==

//Remove Alert
$(document.getElementsByClassName("alert")[0]).hide();

//Create EventListeners
var buttons = document.querySelectorAll("a");

[].forEach.call(buttons, function(button) {
  if (button.hasAttribute("data-type"))
      {
          button.addEventListener("click", btnClick, false);
      }
});

function btnClick(sender)
{
    let pageID = sender.target.getAttribute("data-type");
    localStorage.setItem("pageID", pageID);
}

//Hide all again
$('.section-wrapper').hide();

let pageID = (localStorage.getItem("pageID")) ? localStorage.getItem("pageID") : 1;
$('.' + pageID + '-wrapper').show()