Skip to content

Commit cc9d165

Browse files
committed
Debug
1 parent 67d7e23 commit cc9d165

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

script.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@ async function fetchRepoData() {
8080

8181
// Parse hash to get view state
8282
function parseHash() {
83-
const hash = window.location.hash.slice(1);
83+
let hash = window.location.hash.slice(1);
8484
console.log('Parsing hash:', hash);
8585

86+
// Decode the entire hash first to handle encoded slashes
87+
hash = decodeURIComponent(hash);
88+
console.log('Decoded hash:', hash);
89+
8690
if (!hash) {
8791
return { view: 'platforms', platform: null, problem: null };
8892
}
@@ -96,7 +100,7 @@ function parseHash() {
96100
}
97101

98102
const platform = remainder.slice(0, slashIndex);
99-
const problemName = decodeURIComponent(remainder.slice(slashIndex + 1));
103+
const problemName = remainder.slice(slashIndex + 1);
100104

101105
console.log('Parsed view - platform:', platform, 'problem:', problemName);
102106

0 commit comments

Comments
 (0)