Show the virtual munzee names on the 'convert' page
当前为
// ==UserScript==
// @name ConvertMunzeeEasily
// @namespace VirtualMunzee
// @version 0.4
// @description Show the virtual munzee names on the 'convert' page
// @author CzPeet
// @match https://www.munzee.com/m/*/*/admin/convert/
// @update https://greasyfork.org/en/scripts/373533-showvirtualmunzeename
// @icon https://banner2.cleanpng.com/20180320/avw/kisspng-trademark-brand-aqua-clip-art-iconvert-5ab08819d90e45.4369185715215186178891.jpg
// ==/UserScript==
var possibleTypes = document.querySelectorAll('.form');
var newName = "";
var specCh = 0;
for (var p=0; p<possibleTypes.length; p++)
{
possibleTypes[p].innerHTML = possibleTypes[p].innerHTML.replace(/h5/g,'h6');
possibleTypes[p].parentNode.style.paddingLeft = '5px';
possibleTypes[p].parentNode.style.paddingRight = '5px';
newName = possibleTypes[p].id;
newName = newName.replace('convert-','').replace('virtual_','').replace('_garden_flamingo','').replace('_gnome','');
newName = newName.replace(/_/g,' ');
specCh = (newName.match(new RegExp(" ", "g")) || []).length;
//ugly hack for the better view
switch (specCh)
{
case 2:
newName += "\r\n"
break;
case 1:
newName += "\r\n\r\n"
break;
case 0:
default:
newName += "\r\n\r\n\r\n"
break;
}
possibleTypes[p].children[0].children[1].innerText = newName;
possibleTypes[p].children[0].children[1].style.fontSize = 'x-small';
}