Skip to content

Commit

Permalink
Added listener for new hit notifier events.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonhellman committed May 17, 2019
1 parent a33f8c9 commit 412703c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hitnotifier/listener.js
@@ -0,0 +1,13 @@
document.addEventListener(`hitCatcher`, (event) => {
const hit = event.detail;

chrome.runtime.sendMessage({
hitCatcher: {
id: hit.id,
name: ``,
once: hit.once,
sound: hit.once,
project: hit.project
}
});
});
7 changes: 7 additions & 0 deletions manifest.json
Expand Up @@ -312,6 +312,13 @@
"js": ["mturk/workspace-expander.js"],
"matches": ["https://worker.mturk.com/projects/*/tasks/*"],
"run_at": "document_end"
},

{
"js": ["hitnotifier/listener.js"],
"matches": ["http://hitnotifier.com/*"],
"run_at": "document_end"
}

]
}

0 comments on commit 412703c

Please sign in to comment.