mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 23:08:33 +02:00
Fix review comments: https://github.com/mdn/webextensions-examples/issues/30#issuecomment-172649839
* added README * moved listeners above addListener calls
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
Assign `notify()` as a listener to messages from the content script.
|
||||
*/
|
||||
chrome.runtime.onMessage.addListener(notify);
|
||||
|
||||
/*
|
||||
Log that we received the message.
|
||||
Then display a notification. The notification contains the URL,
|
||||
@@ -19,3 +14,8 @@ function notify(message) {
|
||||
"message": content
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
Assign `notify()` as a listener to messages from the content script.
|
||||
*/
|
||||
chrome.runtime.onMessage.addListener(notify);
|
||||
|
||||
Reference in New Issue
Block a user