Initialisierung: Übertragung aus altem Repository

This commit is contained in:
2021-07-12 00:49:07 +02:00
commit c7f0c6a1c4
80 changed files with 12063 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
// JavaScript des NateMan von Niklas Elsbrock
// --- Flashnachrichten EventListener ---
var flashNode;
for (flashNode of document.getElementsByClassName('flash')) {
flashNode.onclick = function () {
this.style.display = 'none';
};
flashNode.onkeydown = function (event) {
if (event.keyCode === 13) {
this.style.display = 'none';
}
};
}
// --- Tabellenzeilen EventListener ---
var trNode;
var href;
for (trNode of document.getElementsByTagName('tr')) {
if (trNode.getAttribute('data-href') !== null) {
trNode.onclick = function () {
window.location = this.getAttribute('data-href');
};
trNode.onkeydown = function (event) {
if (event.keyCode === 13) {
window.location = this.getAttribute('data-href');
}
};
}
}