|
@ -260,17 +260,16 @@ tag app |
|
|
|
|
|
|
|
|
def handle_click_config |
|
|
def handle_click_config |
|
|
loading = yes |
|
|
loading = yes |
|
|
let set_search_engine = do |
|
|
await (do |
|
|
let input = window.prompt "Please enter the URL of your search engine." |
|
|
let input = window.prompt "Please enter the URL of your search engine." |
|
|
return if input === null |
|
|
return if input === null |
|
|
try |
|
|
try |
|
|
var { href, host } = parse_url input |
|
|
var { href: url, host } = parse_url input |
|
|
catch e |
|
|
catch e |
|
|
return err "changing search engine", e |
|
|
return err "changing search engine", e |
|
|
config.search_engine.url = href |
|
|
let icon = await fetch_image_as_base_64 host |
|
|
config.search_engine.icon = await fetch_image_as_base_64 host |
|
|
Object.assign config.search_engine, { url, icon } |
|
|
save_config! |
|
|
save_config!)! |
|
|
await set_search_engine! |
|
|
|
|
|
settings_active = no |
|
|
settings_active = no |
|
|
loading = no |
|
|
loading = no |
|
|
|
|
|
|
|
|