Get Urls for The Munzee Skin Machine
当前为
// ==UserScript==
// @name GetUndeployedMunzeeURLs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Get Urls for The Munzee Skin Machine
// @author CzPeet
// @match https://www.munzee.com/print
// @icon https://www.google.com/s2/favicons?domain=munzee.com
// @grant none
// ==/UserScript==
if (document.body.innerText.includes("Print Your Munzees"))
{
var mainPage = document.getElementsByClassName("row tooltip-holder")[0];
var delChild = mainPage.children[1].remove();
var mainPanel = mainPage.getElementsByClassName("col-lg-6 col-xs-12")[0];
var URLDIV = document.createElement('DIV');
URLDIV.classList.add("col-lg-6");
URLDIV.classList.add("col-xs-12");
var URLsTextArea = document.createElement('TEXTAREA');
URLsTextArea.setAttribute('id','urlArea');
URLsTextArea.setAttribute('style','width: '+mainPanel.clientWidth+'px; height: '+mainPanel.clientHeight+'px;');
URLDIV.appendChild(URLsTextArea);
mainPage.appendChild(URLDIV);
//EventListeners
var check_batch = document.getElementById('check_batch');
check_batch.addEventListener('click', chBoxChechedChange);
var check_all = document.getElementById('check_all');
check_all.addEventListener('click', chBoxChechedChange);
var inputs = document.querySelectorAll('*[name^="munzee"]');
for(var i = 0; i < inputs.length; i++) {
inputs[i].addEventListener('change', chBoxChechedChange);
}
}
function chBoxChechedChange()
{
$('#urlArea').val('');
var inputs = document.querySelectorAll('*[name^="munzee"]:checked');
for(var i = 0; i < inputs.length; i++) {
$('#urlArea').val($('#urlArea').val() + '\n' +inputs[i].value);
}
}