2021-04-27 12:00:27 +03:00
|
|
|
function SplashCoverImage(path, author, link) {
|
|
|
|
this.path = path;
|
|
|
|
this.author = author;
|
|
|
|
this.link = link;
|
|
|
|
}
|
|
|
|
|
|
|
|
let images = [
|
2021-07-01 15:46:20 +03:00
|
|
|
new SplashCoverImage('Rayquaza', 'Unsettled', 'https://lospec.com/unsettled'),
|
|
|
|
new SplashCoverImage('Mountains', 'Skeddles', 'https://lospec.com/skeddles'),
|
|
|
|
new SplashCoverImage('Sweetie', 'GrafxKid', 'https://twitter.com/GrafxKid'),
|
|
|
|
new SplashCoverImage('Glacier', 'WindfallApples', 'https://lospec.com/windfallapples'),
|
2021-04-27 12:00:27 +03:00
|
|
|
new SplashCoverImage('Polyphorge1', 'Polyphorge', 'https://lospec.com/poly-phorge'),
|
2021-07-01 15:46:20 +03:00
|
|
|
new SplashCoverImage('Fusionnist', 'Fusionnist', 'https://lospec.com/fusionnist')
|
2021-04-27 12:00:27 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
let coverImage = document.getElementById('editor-logo');
|
|
|
|
let authorLink = coverImage.getElementsByTagName('a')[0];
|
|
|
|
let chosenImage = images[Math.round(Math.random() * (images.length - 1))];
|
|
|
|
|
2021-07-07 00:24:20 +03:00
|
|
|
coverImage.style.backgroundImage = 'url("' + chosenImage.path + '.png")';
|
2021-04-27 12:00:27 +03:00
|
|
|
authorLink.setAttribute('href', chosenImage.link);
|
|
|
|
authorLink.innerHTML = 'Art by ' + chosenImage.author;
|