window.onload = function() {
setTimeout(function() {
// XHR to request a JS and a CSS
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://domain.tld/preload.js');
xhr.send('');
xhr = new XMLHttpRequest();
xhr.open('GET', 'http://domain.tld/preload.css');
xhr.send('');
// preload image
new Image().src = "http://domain.tld/preload.png";
}, 1000);
};
window.onload = function () {
for (let i = 1; i <= 4; i++) {
for (let j = 1; j <= 13; j++) {
new Image().src = window.location.protocol + '//' + window.location.host + '/static/dragonfighttiger/pk_' + i + '_' + j + '-min.png';
}
}
};
window.onload = function() { setTimeout(function() { // XHR to request a JS and a CSS var xhr = new XMLHttpRequest(); xhr.open('GET', 'http://domain.tld/preload.js'...