mirror of
https://github.com/2009scape/2009scape.github.io.git
synced 2024-11-23 11:23:17 +01:00
Some more work
This commit is contained in:
parent
12bd698e33
commit
7d7f7240d4
@ -587,12 +587,12 @@ English
|
||||
<div class="arrow_back">
|
||||
<div class="buttons_arrows">
|
||||
<a id="button-up"
|
||||
href="http://services/m=hiscore/overall.ws?rank=1&table=0&scroll=true&category_type=0">
|
||||
href="./hiscores.html">
|
||||
<span class="lev1_arrow"></span>
|
||||
U
|
||||
</a>
|
||||
<a id="button-down"
|
||||
href="http://services/m=hiscore/overall.ws?rank=23&table=0&scroll=true&category_type=0">
|
||||
href="./hiscores.html">
|
||||
<span class="lev1_arrow"></span>
|
||||
D
|
||||
</a>
|
||||
|
@ -1,15 +1,36 @@
|
||||
for (let i = 1; i <= 22; i++) {
|
||||
row = document.getElementsByClassName(`row row${i}`)[0];
|
||||
let page = 0;
|
||||
|
||||
row.childNodes[3].replaceWith(document.createElement("td"));
|
||||
row.childNodes[3].className = "alL";
|
||||
row.childNodes[3].innerHTML = "PlayerName";
|
||||
function populateHSTable() {
|
||||
for (let i = 1; i <= 22; i++) {
|
||||
row = document.getElementsByClassName(`row row${i}`)[0];
|
||||
|
||||
row.childNodes[5].replaceWith(document.createElement("td"));
|
||||
row.childNodes[5].className = "alL";
|
||||
row.childNodes[5].innerHTML = "Level";
|
||||
row.childNodes[3].replaceWith(document.createElement("td"));
|
||||
row.childNodes[3].className = "alL";
|
||||
row.childNodes[3].innerHTML = "PlayerName";
|
||||
|
||||
row.childNodes[7].replaceWith(document.createElement("td"));
|
||||
row.childNodes[7].className = "alL";
|
||||
row.childNodes[7].innerHTML = "XP,XP";
|
||||
}
|
||||
row.childNodes[5].replaceWith(document.createElement("td"));
|
||||
row.childNodes[5].className = "alL";
|
||||
row.childNodes[5].innerHTML = "Level";
|
||||
|
||||
row.childNodes[7].replaceWith(document.createElement("td"));
|
||||
row.childNodes[7].className = "alL";
|
||||
row.childNodes[7].innerHTML = "XP,XP";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Handle page arrows
|
||||
document.getElementById("button-up").addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
if (page > 0) {
|
||||
page--;
|
||||
}
|
||||
populateHSTable();
|
||||
});
|
||||
document.getElementById("button-down").addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
page++;
|
||||
populateHSTable();
|
||||
});
|
||||
|
||||
populateHSTable();
|
Loading…
Reference in New Issue
Block a user