diff --git a/src/api.imba b/src/api.imba index e948e56..9640703 100644 --- a/src/api.imba +++ b/src/api.imba @@ -102,7 +102,7 @@ export default new class api def navigate link await increment_link_frequency link #home_input.value = "" - window.open link.url,'_blank' + new_tab link.url get math_result try @@ -138,7 +138,7 @@ export default new class api def handle_bang return if state.loading await increment_link_frequency bang - window.location.href = encoded_bang_query + new_tab encoded_bang_query def unset_active_bang state.active_bang = no @@ -149,4 +149,7 @@ export default new class api "https://icon.horse/icon/{host}" def help - window.open "https://github.com/familyfriendlymikey/fuzzyhome",'_blank' \ No newline at end of file + new_tab "https://github.com/familyfriendlymikey/fuzzyhome" + + def new_tab(url) + window.open url,'_blank'