diff --git a/hitnotifier/listener.js b/hitnotifier/listener.js new file mode 100644 index 0000000..f3a6f7d --- /dev/null +++ b/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 + } + }); +}); diff --git a/manifest.json b/manifest.json index 60dcfa5..ebaa87a 100644 --- a/manifest.json +++ b/manifest.json @@ -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" } + ] }