mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 14:59:12 +02:00
added short comments for all JS functions
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
/*
|
||||
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,
|
||||
which we read from the message.
|
||||
*/
|
||||
function notify(message) {
|
||||
console.log("background script received message");
|
||||
var title = chrome.i18n.getMessage("notificationTitle");
|
||||
|
||||
Reference in New Issue
Block a user