|
@ -61,12 +61,15 @@ tag app |
|
|
-link.frequency |
|
|
-link.frequency |
|
|
|
|
|
|
|
|
def navigate link |
|
|
def navigate link |
|
|
|
|
|
window.location.href = "//{link.link}" |
|
|
|
|
|
|
|
|
|
|
|
def update_link link |
|
|
link.last_opened = Date.now! |
|
|
link.last_opened = Date.now! |
|
|
link.frequency = link.frequency + 1 |
|
|
link.frequency = link.frequency + 1 |
|
|
await db.put link |
|
|
await db.put link |
|
|
|
|
|
|
|
|
def handle_click_link link |
|
|
def handle_click_link link |
|
|
navigate link |
|
|
update_link link |
|
|
|
|
|
|
|
|
def use_search_engine |
|
|
def use_search_engine |
|
|
state.config.search_engine_frequency += 1 |
|
|
state.config.search_engine_frequency += 1 |
|
@ -78,7 +81,9 @@ tag app |
|
|
if state.scored_links.length < 1 |
|
|
if state.scored_links.length < 1 |
|
|
use_search_engine! |
|
|
use_search_engine! |
|
|
else |
|
|
else |
|
|
navigate state.scored_links[selection_index] |
|
|
let link = state.scored_links[selection_index] |
|
|
|
|
|
update_link link |
|
|
|
|
|
navigate link |
|
|
|
|
|
|
|
|
def handle_shift_return |
|
|
def handle_shift_return |
|
|
use_search_engine! |
|
|
use_search_engine! |
|
|