Skip to content

Commit

Permalink
Tracker: Fix a case when mission has a hyphen in its name
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Mar 14, 2024
1 parent 2577944 commit a3852ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions WebHostLib/static/assets/sc2wolTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ window.addEventListener('load', () => {
// Collapsible advancement sections
const categories = document.getElementsByClassName("location-category");
for (let i = 0; i < categories.length; i++) {
let hide_id = categories[i].id.split('-')[0];
let hide_id = categories[i].id.split('_')[0];
if (hide_id == 'Total') {
continue;
}
categories[i].addEventListener('click', function() {
// Toggle the advancement list
document.getElementById(hide_id).classList.toggle("hide");
// Change text of the header
const tab_header = document.getElementById(hide_id+'-header').children[0];
const tab_header = document.getElementById(hide_id+'_header').children[0];
const orig_text = tab_header.innerHTML;
let new_text;
if (orig_text.includes("▼")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ <h3>{{ player_name }}&apos;s Starcraft 2 Tracker</h3>
<table id="location-table">
{% for area in checks_in_area %}
{% if checks_in_area[area] > 0 %}
<tr class="location-category" id="{{area}}-header">
<tr class="location-category" id="{{area}}_header">
<td>{{ area }} {{'▼' if area != 'Total'}}</td>
<td class="counter">{{ checks_done[area] }} / {{ checks_in_area[area] }}</td>
</tr>
Expand Down

0 comments on commit a3852ed

Please sign in to comment.