Skip to content

Commit ef708ed

Browse files
author
Vic-Nas
committed
Fixed html redirection
1 parent a3c7924 commit ef708ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

script.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,10 @@ async function renderProblem() {
276276
!f.name.includes('.shortest.')
277277
);
278278

279-
// Check if has HTML - if so, redirect
279+
// Check if has HTML - if so, redirect to GitHub raw content
280280
if (htmlFiles.length > 0) {
281-
window.location.href = `${pathStr}/${htmlFiles[0].name}`;
281+
const rawUrl = `https://raw.githubusercontent.com/${getRepoPath()}/main/${pathStr}/${htmlFiles[0].name}`;
282+
window.location.href = rawUrl;
282283
return;
283284
}
284285

0 commit comments

Comments
 (0)