Change message name
This commit is contained in:
parent
a80d8b2c41
commit
e46d295346
@ -26,7 +26,7 @@
|
||||
"Handles messages from the content script"
|
||||
[msg]
|
||||
(match (.-type msg)
|
||||
"fetchData" (channel->promise (fetch-submission (.-url msg)))
|
||||
"urlVisited" (channel->promise (fetch-submission (.-url msg)))
|
||||
x (log/warn "Ignoring unknown message type" x)))
|
||||
|
||||
(-> js/browser
|
||||
|
@ -45,6 +45,6 @@
|
||||
(let [current-url (-> js/window (.-location) (.-href))
|
||||
results-chan (-> js/browser
|
||||
(.-runtime)
|
||||
(.sendMessage #js {:type "fetchData" :url current-url})
|
||||
(.sendMessage #js {:type "urlVisited" :url current-url})
|
||||
(promise->channel))]
|
||||
(go (log/debug "results:" (<! results-chan))))
|
||||
|
Loading…
Reference in New Issue
Block a user