Skip to content

Commit 4226abd

Browse files
Reorder so it would work
and remove old stuff
1 parent 53761c4 commit 4226abd

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

static/misc.js

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
// Why do I keep these here anymore??
2-
window.gebid = document.getElementById.bind(document);
3-
window.qsel = document.querySelector.bind(document);
4-
window.qselall = document.querySelectorAll.bind(document);
5-
6-
function fillEntirePage() {
7-
window.addEventListener('DOMContentLoaded', () => {
8-
document.querySelector('header').remove();
9-
document.querySelector('footer').remove();
10-
document.querySelector('#content').removeAttribute('id');
11-
});
12-
}
1+
(function () {
2+
// Images click
3+
for (var image of document.querySelectorAll("img[src]")) {
4+
image.addEventListener('click', function() {
5+
window.open(this.getAttribute('src'), '_blank');
6+
});
7+
}
8+
})();
139

1410
//---------------------------------------------------------------------------------------------------------------
1511

@@ -40,14 +36,3 @@ function fillEntirePage() {
4036
setInterval(updateThemedStuff, 1000); // allow time for giscus frame to load; and afterwards if it takes longer
4137
dmmq.addEventListener('change', updateThemedStuff);
4238
})();
43-
44-
//---------------------------------------------------------------------------------------------------------------
45-
46-
(function () {
47-
// Images click
48-
for (var image of document.querySelectorAll("img[src]")) {
49-
image.addEventListener('click', function() {
50-
window.open(this.getAttribute('src'), '_blank');
51-
});
52-
}
53-
})();

0 commit comments

Comments
 (0)