Change message name

This commit is contained in:
Jeremy Dormitzer 2018-01-10 18:55:44 -05:00
parent a80d8b2c41
commit e46d295346
No known key found for this signature in database
GPG Key ID: 04F17C0F5A32C320
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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))))