Update changes

This commit is contained in:
Korbs 2025-03-21 15:23:13 -04:00
parent 5ba0d053f2
commit 49a1892678
Signed by: Korbs
SSH key fingerprint: SHA256:Q0b0KraMldpAO9oKa+w+gcsXsOTykQ4UkAKn0ByGn5U
6 changed files with 123 additions and 29 deletions

48
functions/wallpaper.js Normal file
View file

@ -0,0 +1,48 @@
// Set Default
if (localStorage.getItem('wallpaper') === null) {Wallpaper27588471()}
// Apply
function ApplyWallpaper() {
document.querySelector('.tab-background img').setAttribute('src', localStorage.getItem('wallpaper'))
document.querySelector('#wallpaper-credit-link').innerHTML = localStorage.getItem('wallpaper-credit-author')
document.querySelector('#wallpaper-credit-link').setAttribute('href', localStorage.getItem('wallpaper-credit-link'))
}
// Deselect All
function WallpaperDeselectAll() {
document.querySelector('#wallpaper-selection-19906181').style.borderColor = 'transparent'
document.querySelector('#wallpaper-selection-27588471').style.borderColor = 'transparent'
document.querySelector('#wallpaper-selection-27960528').style.borderColor = 'transparent'
}
// Change Wallpaper
function Wallpaper19906181() {
localStorage.setItem('wallpaper', './backgrounds/19906181/background.jpg')
localStorage.setItem('wallpaper-selection', 'wallpaper-selection-19906181')
localStorage.setItem('wallpaper-credit-author', 'Susanne Jutzeler')
localStorage.setItem('wallpaper-credit-link', 'https://www.pexels.com/photo/swiss-alps-in-winter-19906181/')
ApplyWallpaper()
WallpaperDeselectAll()
document.querySelector('#wallpaper-selection-19906181').style.borderColor = 'white'
}
function Wallpaper27588471() {
localStorage.setItem('wallpaper', './backgrounds/27588471/background.jpg')
localStorage.setItem('wallpaper-selection', 'wallpaper-selection-27588471')
localStorage.setItem('wallpaper-credit-author', 'Wolfgang Weiser')
localStorage.setItem('wallpaper-credit-link', 'https://www.pexels.com/photo/elbsandsteingebirge-27588471/')
ApplyWallpaper()
WallpaperDeselectAll()
document.querySelector('#wallpaper-selection-27588471').style.borderColor = 'white'
}
function Wallpaper27960528() {
localStorage.setItem('wallpaper', './backgrounds/27960528/background.jpg')
localStorage.setItem('wallpaper-selection', 'wallpaper-selection-27960528')
localStorage.setItem('wallpaper-credit-author', 'Artem Stoliar')
localStorage.setItem('wallpaper-credit-link', 'https://www.pexels.com/photo/sea-landscape-beach-water-27960528/')
ApplyWallpaper()
WallpaperDeselectAll()
document.querySelector('#wallpaper-selection-27960528').style.borderColor = 'white'
}