mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-23 14:38:21 -05:00
19 lines
462 B
JavaScript
19 lines
462 B
JavaScript
|
document.addEventListener(
|
||
|
'DOMContentLoaded',
|
||
|
() => {
|
||
|
let url = new URL(window.location)
|
||
|
let searchParams = url.searchParams
|
||
|
|
||
|
let safeSearchLevel = searchParams.get('safesearch')
|
||
|
|
||
|
if (
|
||
|
safeSearchLevel >= 0 &&
|
||
|
safeSearchLevel <= 2 &&
|
||
|
safeSearchLevel !== null
|
||
|
) {
|
||
|
document.querySelector('.search_options select').value = safeSearchLevel
|
||
|
}
|
||
|
},
|
||
|
false,
|
||
|
)
|