diff --git a/app/client.imba b/app/client.imba index 2b8bd24..b05e6fd 100644 --- a/app/client.imba +++ b/app/client.imba @@ -94,6 +94,11 @@ tag app def handle_click_export download_json_file JSON.stringify(state.links) + def handle_paste e + return if state.query.length > 0 + global.setTimeout(&, 0) do + window.location.href = 'https://www.google.com/search?q=' + state.query.trim! + def render @@ -145,6 +150,7 @@ tag app @hotkey('shift+return').capture=handle_shift_return @hotkey('esc').capture=$input..blur @input=handle_input + @paste=handle_paste > <.links> for obj in state.scored_links diff --git a/package.json b/package.json index 2c8da8d..d305744 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fuzzyhome", - "version": "0.0.6", + "version": "0.0.7", "scripts": { "start": "imba run -SMH --baseurl . -w server.imba", "build-app": "imba build -SMH --baseurl . server.imba", diff --git a/sw.imba b/sw.imba index 78832c5..c5011fb 100644 --- a/sw.imba +++ b/sw.imba @@ -1,7 +1,7 @@ let p = console.log const app_prefix = "fuzzyhome_cache" -const version = "0.0.6" +const version = "0.0.7" const cache_name = "{app_prefix}-{version}"