forked from billyct/cookies_json_chrome_extension
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b2a9a4
commit a1c19bf
Showing
2 changed files
with
48 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
{ | ||
"page_action": { | ||
"default_icon": "icons/128.png", | ||
"default_popup": "scripts/popup.html", | ||
"default_title": "show the Openconnect cookie/cmd line" | ||
}, | ||
"description": "easily extract and display the VPN cookie to use with openconnect and Cisco AnyConnect Servers.", | ||
"icons": { | ||
"128": "icons/128.png", | ||
"26": "icons/26.png", | ||
"32": "icons/32.png", | ||
"48": "icons/48.png" | ||
}, | ||
"manifest_version": 2, | ||
"name": "OpenAnyconnect Cookie Tray (Uni Lincoln)", | ||
"offline_enabled": false, | ||
"permissions": ["declarativeContent", "activeTab", "cookies", "https://remote.lincoln.ac.uk/*" ], | ||
"short_name": "cookietray", | ||
"version": "0.0.2", | ||
"background": { | ||
"scripts": ["scripts/background.js"], | ||
"persistent": false | ||
} | ||
} | ||
"description": "easily extract and display the VPN cookie to use with openconnect and Cisco AnyConnect Servers.", | ||
"icons": { | ||
"128": "icons/128.png", | ||
"26": "icons/26.png", | ||
"32": "icons/32.png", | ||
"48": "icons/48.png" | ||
}, | ||
"manifest_version": 3, | ||
"name": "OpenAnyconnect Cookie Tray (Uni Lincoln)", | ||
"offline_enabled": false, | ||
"permissions": [ | ||
"declarativeContent", | ||
"activeTab", | ||
"cookies" | ||
], | ||
"short_name": "cookietray", | ||
"version": "0.1.0", | ||
"background": { | ||
"service_worker": "service_worker.js" | ||
}, | ||
"action": { | ||
"default_icon": "icons/128.png", | ||
"default_popup": "scripts/popup.html", | ||
"default_title": "show the Openconnect cookie/cmd line" | ||
}, | ||
"content_security_policy": {}, | ||
"host_permissions": [ | ||
"https://remote.lincoln.ac.uk/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
chrome.runtime.onInstalled.addListener(function() { | ||
// Replace all rules ... | ||
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { | ||
// With a new rule ... | ||
chrome.declarativeContent.onPageChanged.addRules([ | ||
{ | ||
// That fires when a page's URL contains a 'g' ... | ||
conditions: [ | ||
new chrome.declarativeContent.PageStateMatcher({ | ||
pageUrl: { urlContains: 'https://remote.lincoln.ac.uk' }, | ||
}) | ||
], | ||
// And shows the extension's page action. | ||
actions: [ new chrome.declarativeContent.ShowPageAction() ] | ||
} | ||
]); | ||
}); | ||
}); |