mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Prevent overloading of window.onload
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
let tables = null;
|
window.addEventListener('load', () => {
|
||||||
|
const tables = $(".table").DataTable({
|
||||||
window.onload = () => {
|
|
||||||
tables = $(".table").DataTable({
|
|
||||||
paging: false,
|
paging: false,
|
||||||
info: false,
|
info: false,
|
||||||
scrollCollapse: true,
|
scrollCollapse: true,
|
||||||
@@ -37,6 +35,4 @@ window.onload = () => {
|
|||||||
y_sync: true,
|
y_sync: true,
|
||||||
x_sync: true
|
x_sync: true
|
||||||
});
|
});
|
||||||
|
});
|
||||||
window.onresize = () => tables.draw();
|
|
||||||
}
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
window.onload = () => {
|
window.addEventListener('load', () => {
|
||||||
document.getElementById('upload-button').addEventListener('click', () => {
|
document.getElementById('upload-button').addEventListener('click', () => {
|
||||||
document.getElementById('file-input').click();
|
document.getElementById('file-input').click();
|
||||||
});
|
});
|
||||||
@@ -14,4 +14,4 @@ window.onload = () => {
|
|||||||
"info": false,
|
"info": false,
|
||||||
"dom": "t",
|
"dom": "t",
|
||||||
});
|
});
|
||||||
};
|
});
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
window.onload = () => {
|
window.addEventListener('load', () => {
|
||||||
const timeElement = document.getElementById('creation-time');
|
const timeElement = document.getElementById('creation-time');
|
||||||
const creationTime = timeElement.getAttribute('data-creation-time');
|
const creationTime = timeElement.getAttribute('data-creation-time');
|
||||||
const creationDate = new Date(creationTime);
|
const creationDate = new Date(creationTime);
|
||||||
timeElement.innerText = creationDate.toLocaleString();
|
timeElement.innerText = creationDate.toLocaleString();
|
||||||
};
|
});
|
||||||
|
Reference in New Issue
Block a user