mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-16 14:28:33 +02:00
added logging statements
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
chrome.runtime.onMessage.addListener(notify);
|
||||
|
||||
function notify(message) {
|
||||
console.log("background script received message");
|
||||
chrome.notifications.create({
|
||||
"type": "basic",
|
||||
"iconUrl": chrome.extension.getURL("link.png"),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
window.addEventListener("click", notifyExtension);
|
||||
|
||||
function notifyExtension(e) {
|
||||
console.log("content script sending message");
|
||||
if (e.target.tagName != "A") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "Content scripting",
|
||||
"name": "Notify link clicks",
|
||||
"version": "1.0",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
|
||||
Reference in New Issue
Block a user