Skip to content

Commit d92abfd

Browse files
committed
Remove script inline
1 parent 9d9f38c commit d92abfd

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

templates/components/layout.html.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,5 @@
6969
</main>
7070
{{> components/footer}}
7171
<script src="{{baseurl_assets}}/static/scripts/languages.js"></script>
72-
{{#> script }}{{/script}}
7372
</body>
7473
</html>

templates/funding.html.hbs

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,33 @@
2525
{{> member member=member baseurl=../baseurl }}
2626
{{/each}}
2727
</div>
28-
</section>
29-
30-
{{/inline}}
31-
32-
{{#*inline "script"}}
33-
<script type="text/javascript">
34-
// From https://stackoverflow.com/a/2450976/1107768
35-
function shuffle(array) {
36-
let currentIndex = array.length;
28+
<script type="text/javascript">
29+
// From https://stackoverflow.com/a/2450976/1107768
30+
function shuffle(array) {
31+
let currentIndex = array.length;
3732
38-
// While there remain elements to shuffle...
39-
while (currentIndex !== 0) {
40-
// Pick a remaining element...
41-
let randomIndex = Math.floor(Math.random() * currentIndex);
42-
currentIndex--;
33+
// While there remain elements to shuffle...
34+
while (currentIndex !== 0) {
35+
// Pick a remaining element...
36+
let randomIndex = Math.floor(Math.random() * currentIndex);
37+
currentIndex--;
4338
44-
// And swap it with the current element.
45-
[array[currentIndex], array[randomIndex]] = [
46-
array[randomIndex], array[currentIndex]];
39+
// And swap it with the current element.
40+
[array[currentIndex], array[randomIndex]] = [
41+
array[randomIndex], array[currentIndex]];
42+
}
4743
}
48-
}
4944
50-
document.addEventListener("DOMContentLoaded", () => {
51-
// Shuffle people to reduce ordering bias
52-
const wrapper = document.querySelector("#people");
53-
const children = Array(...wrapper.children);
54-
shuffle(children);
55-
wrapper.replaceChildren(...children);
56-
});
57-
</script>
45+
document.addEventListener("DOMContentLoaded", () => {
46+
// Shuffle people to reduce ordering bias
47+
const wrapper = document.querySelector("#people");
48+
const children = Array(...wrapper.children);
49+
shuffle(children);
50+
wrapper.replaceChildren(...children);
51+
});
52+
</script>
53+
</section>
54+
5855
{{/inline}}
56+
5957
{{~> (lookup this "parent")~}}

0 commit comments

Comments
 (0)