Background image url can have query params

pull/131/head
Vytas 2020-10-02 10:12:46 -05:00 committed by GitHub
parent 728237048e
commit 644cad9eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -624,7 +624,8 @@
image.src = "hk/background.jpg"; // Use default if image fails.
};
if (typeof background_reload !== 'undefined' && background_reload > 0) {
image.src = background_url + '?' + new Date().getTime();
var op = background_url.indexOf('?') > 0 ? '&' : '?';
image.src = background_url + op + new Date().getTime();
setTimeout(load_background, (background_reload * 1000));
} else {
image.src = background_url;