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

31
functions/search.js Normal file
View file

@ -0,0 +1,31 @@
// Set Default
if (localStorage.getItem('search-engine-provider') === null) {SetDuckDuckGo()}
// Apply
document.querySelector('.search input').setAttribute('placeholder', 'Search ' + localStorage.getItem('search-engine-provider') + '...')
document.querySelector('#settings-search').value = localStorage.getItem('search-engine-provider')
// Set Search Engine
function SetDuckDuckGo() {
localStorage.setItem('search-engine-provider', "DuckDuckGo")
localStorage.setItem('search-engine', "https://duckduckgo.com/?t=h_&q=")
document.querySelector('.search input').setAttribute('placeholder', 'Search ' + localStorage.getItem('search-engine-provider') + '...')
}
function Set4get() {
localStorage.setItem('search-engine-provider', "4get")
localStorage.setItem('search-engine', "https://4get.sudovanilla.org/web?s=")
document.querySelector('.search input').setAttribute('placeholder', 'Search ' + localStorage.getItem('search-engine-provider') + '...')
}
function SetAraa() {
localStorage.setItem('search-engine-provider', "Araa")
localStorage.setItem('search-engine', "https://araa.sudovanilla.org/search?q=")
document.querySelector('.search input').setAttribute('placeholder', 'Search ' + localStorage.getItem('search-engine-provider') + '...')
}
function SetBrave() {
localStorage.setItem('search-engine-provider', "Brave")
localStorage.setItem('search-engine', "https://search.brave.com/search?q=")
document.querySelector('.search input').setAttribute('placeholder', 'Search ' + localStorage.getItem('search-engine-provider') + '...')
}

View file

@ -8,6 +8,16 @@ function ShowSettings() {
}
}
// Open Wallpapers
function ShowWallpapers() {
ShowSettings()
var SettingsPopup = document.querySelector('.wallpaper-selector')
if (SettingsPopup.style.display === "block") {
SettingsPopup.style.display = "none";
} else {
SettingsPopup.style.display = "block";
}
}
// Search
function ToggleOnSearch() { localStorage.setItem('enable-search', "true"); location.href = '/' }
function ToggleOffSearch() { localStorage.setItem('enable-search', "false"); location.href = '/' }

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'
}