Skip to content

Commit

Permalink
Ajusted: Beta browser warning to include cyberfox.
Browse files Browse the repository at this point in the history
  • Loading branch information
InternalError503 committed Oct 27, 2016
1 parent 841b6b7 commit 6c53959
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions chrome/content/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,28 @@ initPane: function(){
request.send(null);
},



/*
Show a brief notifcation to the user about beta language packs then hide the notification after * time.
6 seconds should be enough to inform the user then hide the notification to prevet wasted vertical screen space.
Note: For AMO reviewers this notifcation should only show in firefox beta clients.
*/
showbetaWarning : function(){
var notice = document.getElementById("betawarningtouser");
if (notice && typeof(notice) != "undefined" || notice != null){
notice.hidden = false;
setTimeout(function() {
notice.hidden = true;
}, 6000); // Wait 6 seconds before hiding the notification.
}
},

/*
Here we are making sure only the mode for the browser can be enabled on that browser.
Example: Firefoxmode can only be enabled in firefox etc.
*/
*/

checkBrowser : function(){
try{
// Check if browser Firefox
Expand All @@ -480,25 +498,17 @@ initPane: function(){
*/
if (Services.prefs.getCharPref("app.update.channel") === "beta"){
Services.prefs.setCharPref("extensions.language_manager.browser_mode", "firefoxbetamode");
/*
Show a brief notifcation to the user about beta language packs then hide the notification after * time.
6 seconds should be enough to inform the user then hide the notification to prevet wasted vertical screen space.
Note: For AMO reviewers this notifcation should only show in firefox beta clients.
*/
var notice = document.getElementById("betawarningtouser");
if (notice && typeof(notice) != "undefined" || notice != null){
notice.hidden = false;
setTimeout(function() {
notice.hidden = true;
}, 6000); // Wait 6 seconds before hiding the notification.
}
gLanguageManger.showbetaWarning();
}else{
Services.prefs.setCharPref("extensions.language_manager.browser_mode", "firefoxmode");
}
}
// Check if browser Cyberfox (Additional fallback)
if (gLMangerHandler.browserAppInformation.name.toLowerCase() === "Cyberfox".toLowerCase()) {
Services.prefs.setCharPref("extensions.language_manager.browser_mode", "cyberfoxmode");
Services.prefs.setCharPref("extensions.language_manager.browser_mode", "cyberfoxmode");
if (Services.prefs.getCharPref("app.update.channel.type") == "beta"){
gLanguageManger.showbetaWarning();
}
}
}catch (e){
// Catch any nasty errors and output to dialogue
Expand Down

0 comments on commit 6c53959

Please sign in to comment.