Skip to content

Commit

Permalink
Fixed single tracker refresh.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkssr committed Nov 30, 2024
1 parent fbbbef9 commit 4203f16
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions WebHostLib/templates/tracker__HK.html
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
</div>
{% endif %}



<script>
const parser = new DOMParser();
Expand All @@ -345,7 +345,13 @@
}

const fakeDOM = parser.parseFromString(await response.text(), "text/html");
document.querySelector(".inventory-grid").innerHTML = fakeDOM.querySelector(".inventory-grid").innerHTML;

const inventoryGrid = document.querySelectorAll(".inventory-grid");
const fakeInventoryGrid = fakeDOM.querySelectorAll(".inventory-grid");

for (let i = 0; i < inventoryGrid.length; ++i) {
inventoryGrid[i].innerHTML = fakeInventoryGrid[i].innerHTML;
}

const regionDetailElements = document.querySelectorAll(".region-details");
const fakeDetailElements = fakeDOM.querySelectorAll(".region-details");
Expand Down

0 comments on commit 4203f16

Please sign in to comment.