Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Fixed default whitelist upgrade code
Browse files Browse the repository at this point in the history
  • Loading branch information
dillbyrne committed Sep 21, 2016
1 parent c7d7ff5 commit 6c3f873
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Ras.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,16 +433,17 @@ exports.onInstall = function() {
exports.onUpgrade = function() {

//upgrade to the latest firefox if the previous default whilelist profile is in use
if(PrefServ.getter("extensions.agentSpoof.whiteListUserAgent") === "Mozilla/5.0 (Windows NT 6.2; rv:43.0) Gecko/20100101 Firefox/43.0")
if(PrefServ.getter("extensions.agentSpoof.whiteListUserAgent") === "Mozilla/5.0 (Windows NT 6.2; rv:43.0) Gecko/20100101 Firefox/43.0"){
PrefServ.setter("extensions.agentSpoof.whiteListUserAgent","Mozilla/5.0 (Windows NT 6.2; rv:50.0) Gecko/20100101 Firefox/50.0");

(require('./Panel').getPanel()).port.emit('setElementValue', 'useragent_input', PrefServ.getter('extensions.agentSpoof.whiteListUserAgent'));
}

//upgrade default whitelist if it is unchanged (youtube now uses html video and no longer needs the canvas to be whitelisted )¬
if(PrefServ.getter('extensions.agentSpoof.fullWhiteList') ===
'[{"url": "play.google.com"}, {"url": "s.ytimg.com", "options": ["canvas"]}, {"url": "youtube.com", "options": ["canvas"]}]'){

PrefServ.setter('extensions.agentSpoof.fullWhiteList','[{"url": "addons.mozilla.org"}, {"url": "play.google.com"}, {"url": "youtube.com"}]');
(require('./Panel').getPanel()).port.emit('setElementValue', 'useragent_input', PrefServ.getter('extensions.agentSpoof.whiteListUserAgent'));
(require('./Panel').getPanel()).port.emit('setElementValue', 'site_whitelist', PrefServ.getter('extensions.agentSpoof.fullWhiteList'));
}

//set geolocation provider to mozilla if it is not already set to mozilla or google,
Expand Down

0 comments on commit 6c3f873

Please sign in to comment.