mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 06:48:37 +02:00
adding onChange example code
This commit is contained in:
@@ -59,4 +59,10 @@ reset.onclick = function() {
|
||||
name: "bgpicker"
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* Report cookie changes to the console */
|
||||
|
||||
chrome.cookies.onChanged.addListener(function(changeInfo) {
|
||||
console.log('Cookie changed:\n* Cookie: ' + JSON.stringify(changeInfo.cookie) + '\n* Cause: ' + changeInfo.cause + '\n* Removed: ' + changeInfo.removed)
|
||||
})
|
||||
@@ -157,7 +157,8 @@
|
||||
"Cookie",
|
||||
"get",
|
||||
"set",
|
||||
"remove"
|
||||
"remove",
|
||||
"onChanged"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user