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

Commit

Permalink
fix for improper user agent detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Neil committed Mar 6, 2013
1 parent 6a0a108 commit b716a35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions samples/index.htm
Expand Up @@ -30,7 +30,7 @@
// This is code to ensure that if webworksready is fired multiple times we still only init() one time
if (webworksreadyFired) return;
webworksreadyFired = true;

var config;
// Toggle our coloring for testing
if (darkColoring) {
Expand All @@ -43,6 +43,7 @@
coloredTitleBar: true,
bb10ForPlayBook: true};
}

// Handle styling of the screen before it is displayed
config.onscreenready = function(element, id) {
if (darkColoring && bb.device.isBB10) {
Expand Down Expand Up @@ -93,7 +94,7 @@

// Fire the webworksready event for PlayBook and BBOS
window.addEventListener('load',function() {
if (navigator.userAgent.indexOf('Version/10.0') < 0) {
if (navigator.userAgent.indexOf('BB10') < 0) {
var evt = document.createEvent('Events');
evt.initEvent('webworksready', true, true);
document.dispatchEvent(evt);
Expand Down

0 comments on commit b716a35

Please sign in to comment.