-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display warning when user do not use recommended Firefox browser
- Fix name of theme to Super.Human.Portal related (reference #55)
- Loading branch information
1 parent
501e26c
commit fc7b8b3
Showing
5 changed files
with
35 additions
and
4 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
27 changes: 27 additions & 0 deletions
27
...an.Portal_Royale/src/net/apacheRoyaleTemplatedApp/controller/CommandShowBrowserWarning.as
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,27 @@ | ||
package controller | ||
{ | ||
import org.apache.royale.jewel.Snackbar; | ||
import org.puremvc.as3.multicore.interfaces.INotification; | ||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand; | ||
|
||
public class CommandShowBrowserWarning extends SimpleCommand | ||
{ | ||
override public function execute(note:INotification):void | ||
{ | ||
var showBrowserWarning:Boolean = Boolean(window["Cookies"].get("SuperHumanPortalBrowserWarning")); | ||
if (!showBrowserWarning) | ||
{ | ||
window["Cookies"].set("SuperHumanPortalBrowserWarning", true); | ||
|
||
var uaParser:Object = new window["UAParser"](); | ||
var browser:Object = uaParser.getBrowser(); | ||
|
||
if (browser.name != "Firefox") | ||
{ | ||
var browserSnackbar:Snackbar = Snackbar.show("It appears you're currently using a browser other than Firefox. For the optimum experience and full compatibility with all the features of our app, we highly recommend utilizing Firefox.", | ||
0, "Close"); | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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