NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Mobile // @include *.plemiona.* // @include plemiona.* // @version 1 // @grant none // ==/UserScript== //document.getElementById("buildings_visual").style.width="400px"; /* document.getElementById("buildings_visual").childNodes[33].style.width="400px"; document.getElementById("buildings_visual").childNodes[33].style.height="270px"; */ document.getElementById("buildings_visual").style.width="0px"; //document.getElementById("buildings_visual").childNodes[33].style.height="100%"; //document.getElementById("buildings_visual").style.visibility="hidden"; //<tr id='materials'><td class=surowiec_o></td><td class='surowiec_w'><td class=surowiec_o></td><td class='surowiec_w'><td class=surowiec_o></td><td class='surowiec_w'></tr> var levelTable = []; function getLevel(buildingName){ if (document.getElementById("l_"+buildingName)){ return document.getElementById("l_"+buildingName).childNodes[1].childNodes[1].textContent; } return "0"; } function saveLevels(){ levelTable[0]=getLevel('main'); levelTable[1]=getLevel('barracks'); levelTable[2]=getLevel('stable'); levelTable[3]=getLevel('garage'); levelTable[4]=getLevel('snob'); levelTable[5]=getLevel('smith'); levelTable[6]=getLevel('place'); levelTable[7]=getLevel('statue'); levelTable[8]=getLevel('market'); levelTable[9]=getLevel('wood'); levelTable[10]=getLevel('stone'); levelTable[11]=getLevel('iron'); levelTable[12]=getLevel('farm'); levelTable[13]=getLevel('storage'); levelTable[14]=getLevel('hide'); levelTable[15]=getLevel('wall'); } function fillLevels(){ document.getElementById('ratusz').childNodes[0].innerHTML=levelTable[0]; document.getElementById('koszary').childNodes[0].innerHTML=levelTable[1]; document.getElementById('stajnia').childNodes[0].innerHTML=levelTable[2]; document.getElementById('warsztat').childNodes[0].innerHTML=levelTable[3]; document.getElementById('palac').childNodes[0].innerHTML=levelTable[4]; document.getElementById('kuznia').childNodes[0].innerHTML=levelTable[5]; document.getElementById('plac').childNodes[0].innerHTML=levelTable[6]; document.getElementById('piedestal').childNodes[0].innerHTML=levelTable[7]; document.getElementById('rynek').childNodes[0].innerHTML=levelTable[8]; document.getElementById('tartak').childNodes[0].innerHTML=levelTable[9]; document.getElementById('cegielnia').childNodes[0].innerHTML=levelTable[10]; document.getElementById('huta').childNodes[0].innerHTML=levelTable[11]; document.getElementById('zagroda').childNodes[0].innerHTML=levelTable[12]; document.getElementById('spichlerz').childNodes[0].innerHTML=levelTable[13]; document.getElementById('schowek').childNodes[0].innerHTML=levelTable[14]; document.getElementById('mur').childNodes[0].innerHTML=levelTable[15]; } var buildingTable="<table border='1'>\ <tr id='ratusz'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=main'>Ratusz</a></td></tr>\ <tr id='koszary'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=barracks'>Koszary</a></td></tr>\ <tr id='stajnia'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=stable'>Stajnia</a></td></tr>\ <tr id='warsztat'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=garage'>Warsztat</a></td></tr>\ <tr id='palac'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=snob'>Pałac</a></td></tr>\ <tr id='kuznia'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=smith'>Kuźnia</a></td></tr>\ <tr id='plac'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=place'>Plac</a></td></tr>\ <tr id='piedestal'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=statue'>Piedestał</a></td></tr>\ <tr id='rynek'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=market'>Rynek</a></td></tr>\ <tr id='tartak'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=wood'>Tartak</a></td></tr>\ <tr id='cegielnia'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=stone'>Cegielnia</a></td></tr>\ <tr id='huta'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=iron'>Huta żelaza</a></td></tr>\ <tr id='zagroda'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=farm'>Zagroda</a></td></tr>\ <tr id='spichlerz'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=storage'>Spichlerz</a></td></tr>\ <tr id='schowek'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=hide'>Schowek</a></td></tr>\ <tr id='mur'><td class='k_level'></td><td class='k_link'><a href='game.php?screen=wall'>Mur</a></td></tr>\ </table>"; //#l_barracks > a:nth-child(1) > div:nth-child(1) //#l_main > a:nth-child(1) > div:nth-child(1) //#ratusz > td:nth-child(1) saveLevels(); document.getElementById("buildings_visual").innerHTML=buildingTable; tableClass_level=document.getElementsByClassName("k_level"); fillLevels(); for (var i=0;i<tableClass_level.length;i++){ tableClass_level[i].style.width="10px"; tableClass_level[i].style.height="5px"; } //class p_wood 70 70