Skip to content

Commit 3d4d4c5

Browse files
committed
build
1 parent e1599e8 commit 3d4d4c5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

JSX

Submodule JSX updated 1 file

assets/js/web.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ window.addEventListener('load', function(e) {
142142
var a = li.children[0];
143143
a.addEventListener('click', function(event) {
144144
event.preventDefault();
145+
event.stopPropagation();
145146

146147
input.dataset["path"] = a.dataset["path"];
147148

@@ -152,10 +153,12 @@ window.addEventListener('load', function(e) {
152153

153154
input.value = xhr.responseText.replace(/\t/g, " ");
154155

155-
forEach(list.children, function(li) {
156-
li.className = "";
156+
forEach(list.getElementsByTagName("li"), function(li) {
157+
if(!li.className.match(/\bsource-file\b/)) return;
158+
159+
li.className = "source-file";
157160
});
158-
li.className = "active";
161+
li.className = "source-file active";
159162

160163
compile({ mode: "run" });
161164
};

0 commit comments

Comments
 (0)