Skip to content

Commit cd65edd

Browse files
committed
Fix icon
1 parent 3226fd3 commit cd65edd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

404.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<head>
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<link rel="icon" type="image/png" href="./favicon.png" />
87
<title>emgithub</title>
98
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
109
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
@@ -496,6 +495,13 @@ <h1>emgithub</h1>
496495
// Is entering the site directly
497496
targetInput.placeholder = "https://github.com/user/repository/blob/branch/src/hello.cpp#L2-L6";
498497
}
498+
499+
// Add the favicon dynamically
500+
const link = document.createElement("link");
501+
link.type = "image/png";
502+
link.rel = "icon";
503+
link.href = `${parts.current}favicon.png`;
504+
document.head.appendChild(link);
499505
});
500506

501507
function switchTypeSelect() {

0 commit comments

Comments
 (0)