/* Inputcounter (counts the amount of characters that are left). For credit, see //minecraft-nl.gamepedia.com/Gebruiker:DarkShadowTNT/inputcounter.js */
mw.loader.load( '//minecraft-nl.gamepedia.com/index.php?title=Gebruiker:DarkShadowTNT/inputcounter.js&action=raw&ctype=text/javascript' );
/*
Basic setup of a script that comes from the Dutch Minecraft Wiki:
//minecraft-nl.gamepedia.com/index.php?title=' + paginatitel + '&action=raw&ctype=text/javascript
*/
/* Live recent changes */
// ]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');
/** Replace the word 'Kladblok' with a dropdown so I can choose between '1' and '2' (and others). The style for this piece of script is available at ] **/
/* 'Kladblok' has to be replaced with this first (you can add as many as you want)... */
var fancystuff =
"<li id=pt-useless> \
<button onclick=dropdown() class=dropbtn>Kladblok</button> \
<div id=kladblok-uitklappen class=dropdown-content> \
<a href=https://wikines.com/nl/Gebruiker:DarkShadowTNT/Kladblok>Kladblok 1</a> \
<a href=https://wikines.com/nl/Gebruiker:DarkShadowTNT/Kladblok_2>Kladblok 2</a> \
<a href=https://wikines.com/nl/Gebruiker:DarkShadowTNT/Kladblok_3>Kladblok 3</a> \
<!-- Infinitely exapandable --> \
</div> \
</li>";
$('#pt-sandbox').replaceWith(fancystuff);
/* ...before function 'dropdown()' can be used */
function dropdown() {
document.getElementById("kladblok-uitklappen").classList.toggle("show");
}
window.onhover = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns;
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
};