Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #46 from mzhilyaev/issue_27

Closes #27: Whitelist app for localstorage usage?
  • Loading branch information...
commit a0e31f52f36d83aacac8e9ae56c1c5083d7e3928 2 parents aabe66d + 21f0ffd
@tofumatt tofumatt authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 addon/lib/main.js
View
8 addon/lib/main.js
@@ -83,10 +83,12 @@ function addAppsButton(window, browser) {
exports.main = function(options) {
// grant permissions to manage installed apps
+ // and access AppCache
MOZAPP_PAGES_WHITE_LIST.forEach(function(host) {
- Services.perms.add(Services.io.newURI(host, null, null),
- "webapps-manage",
- Ci.nsIPermissionManager.ALLOW_ACTION);
+ let hostUri = Services.io.newURI(host, null, null);
+ Services.perms.add(hostUri, "webapps-manage", Ci.nsIPermissionManager.ALLOW_ACTION);
+ Services.perms.add(hostUri, "pin-app", Ci.nsIPermissionManager.ALLOW_ACTION);
+ Services.perms.add(hostUri, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);
});
// per-window initialization
Please sign in to comment.
Something went wrong with that request. Please try again.