June 13, 2022

Скрипт для Miningnetwork

window.setInterval(() =>
{
if(document.getElementById('buttons-added') === null)
{
let perLevel = {_levels: []};
Array.from(document.querySelectorAll('legend')).forEach(a => {
let level = parseInt(a.innerText.split(' ')[1], 10);
if(level >= 0)
{
if(!perLevel.hasOwnProperty(level))
{
perLevel[level] = [];
perLevel._levels.push(level);
}
perLevel[level].push(a.parentElement);
}
});
if(perLevel._levels.length > 0)
{
perLevel._levels.sort((a,b) => a < b ? -1 : 1);
let parent = perLevel[perLevel._levels[0]][0].parentNode;
perLevel._levels.forEach(l => {
let btn = document.createElement('button');
btn.innerText = `${l} (${perLevel[l].length})` ;
btn.onclick = function(){
perLevel._levels.forEach(lvl => {
let dsp = lvl === l ? '' : 'none';
perLevel[lvl].forEach(x => x.style.display = dsp);
});
return false;
};
parent.parentNode.insertBefore(btn, parent)
});
let a = document.createElement('a');
a.innerHTML = `<a id="buttons-added" href="https://t.me/youngboynft" target="_blank">My channel YoungboyNFT Нажми!</a>` ;
parent.parentNode.insertBefore(a, parent);
}
}
}, 500);