Skip to content

Commit 0fd8a85

Browse files
committed
Fix vicutil's paths
1 parent 51cb6ad commit 0fd8a85

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,11 @@ <h2 id="problems-title"></h2>
713713
`;
714714

715715
if (problem.hasHtml && problem.htmlFiles.length > 0) {
716-
item.onclick = () => window.location.href = `${platform}/${problem.name}/${problem.htmlFiles[0].name}`;
716+
if (platform === 'vicutils') {
717+
item.onclick = () => window.location.href = `${platform}/${problem.htmlFiles[0].name}`;
718+
} else {
719+
item.onclick = () => window.location.href = `${platform}/${problem.name}/${problem.htmlFiles[0].name}`;
720+
}
717721
} else {
718722
item.onclick = () => generatePage(platform, problem);
719723
}
@@ -768,8 +772,8 @@ <h2 id="problems-title"></h2>
768772
const platformTitle = platform === 'vicutils' ? 'VicUtils' : platform.charAt(0).toUpperCase() + platform.slice(1);
769773

770774
const repoUrl = platform === 'vicutils'
771-
? `https://github.com/${getRepoPath()}/blob/main/${platform}`
772-
: `https://github.com/${getRepoPath()}/tree/main/${platform}`;
775+
? `https://github.com/${getRepoPath()}/blob/main/${platform}/${problem.name}`
776+
: `https://github.com/${getRepoPath()}/tree/main/${platform}/${problem.name}`;
773777

774778
let pageContent = `
775779
<div class="generated-page">

0 commit comments

Comments
 (0)