Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onRemoved(cookie) {
- console.log(`Removed: ${cookie}`);
- }
- function onError(error) {
- console.log(`Error removing cookie: ${error}`);
- }
- function removeCookie() {
- var removing = browser.cookies.remove({
- url: "example.com"
- });
- removing.then(onRemoved, onError);
- }
- browser.browserAction.onClicked.addListener(removeCookie);
- {
- "description": "RemoveCookie",
- "manifest_version": 2,
- "name": "remove-cookies",
- "version": "1.0",
- "icons": {
- "48": "icons/icon.png"
- },
- "background": {
- "scripts": ["background.js"]
- },
- "browser_action": {
- "default_icon": "icons/icon.png",
- "default_title": "Remove Cookie!"
- },
- "permissions": [
- "*://*.example.com/*",
- "cookies"
- ]
- }
Add Comment
Please, Sign In to add comment