diff --git a/dashboard-ui/components/imagedownloader/imagedownloader.js b/dashboard-ui/components/imagedownloader/imagedownloader.js index b7239310ae..36ebb63f36 100644 --- a/dashboard-ui/components/imagedownloader/imagedownloader.js +++ b/dashboard-ui/components/imagedownloader/imagedownloader.js @@ -6,7 +6,7 @@ var hasChanges = false; // These images can be large and we're seeing memory problems in safari - var browsableImagePageSize = $.browser.safari ? 6 : 10; + var browsableImagePageSize = browserInfo.safari ? 6 : 10; var browsableImageStartIndex = 0; var browsableImageType = 'Primary'; diff --git a/dashboard-ui/components/paperdialoghelper.js b/dashboard-ui/components/paperdialoghelper.js index fa9a8f8a81..8679ab3310 100644 --- a/dashboard-ui/components/paperdialoghelper.js +++ b/dashboard-ui/components/paperdialoghelper.js @@ -52,10 +52,10 @@ function enableHashChange() { // It's not firing popstate in response to hashbang changes - if ($.browser.msie) { + if (browserInfo.msie) { return false; } - if ($.browser.edge) { + if (browserInfo.edge) { return false; } return true; @@ -92,7 +92,7 @@ // but not needed here since this is already on top of an existing dialog // but skip it in IE because it's causing the entire browser to hang // Also have to disable for firefox because it's causing select elements to not be clickable - if (!$.browser.msie && !$.browser.mozilla) { + if (!browserInfo.msie && !browserInfo.mozilla) { if (options.modal !== false) { dlg.setAttribute('modal', 'modal'); } diff --git a/dashboard-ui/components/tvguide/tvguide.js b/dashboard-ui/components/tvguide/tvguide.js index d04bc3d771..f79550f2a3 100644 --- a/dashboard-ui/components/tvguide/tvguide.js +++ b/dashboard-ui/components/tvguide/tvguide.js @@ -483,7 +483,7 @@ onProgramGridScroll(tabContent, this); }); - if ($.browser.mobile) { + if (browserInfo.mobile) { tabContent.querySelector('.tvGuide').classList.add('mobileGuide'); } else { diff --git a/dashboard-ui/cordova/chromecast.js b/dashboard-ui/cordova/chromecast.js index c8252df449..72ddf80a59 100644 --- a/dashboard-ui/cordova/chromecast.js +++ b/dashboard-ui/cordova/chromecast.js @@ -510,7 +510,7 @@ currentSession.on('message', handleMessage); currentSession.on('disconnect', handleSessionDisconnect); - if (connectToSession || $.browser.safari) { + if (connectToSession || browserInfo.safari) { currentSession.connect().success(function () { onWebAppSessionConnect(currentSession, device); diff --git a/dashboard-ui/cordova/imagestore.js b/dashboard-ui/cordova/imagestore.js index 0b944def48..6b22f4673b 100644 --- a/dashboard-ui/cordova/imagestore.js +++ b/dashboard-ui/cordova/imagestore.js @@ -52,7 +52,7 @@ } function normalizeReturnUrl(url) { - if ($.browser.safari) { + if (browserInfo.safari) { // Use the embedded server for iOS8, and also if we don't know the iOS version, just to be safe var index = url.indexOf('/Documents'); @@ -68,7 +68,7 @@ self.getImageUrl = function (originalUrl) { - if ($.browser.android && originalUrl.indexOf('tag=') != -1) { + if (browserInfo.android && originalUrl.indexOf('tag=') != -1) { originalUrl += "&accept=webp"; } @@ -108,7 +108,7 @@ setImageIntoElement(elem, url); } - //if ($.browser.safari) { + //if (browserInfo.safari) { // setImageWithSdWebImage(elem, url); // return; //} diff --git a/dashboard-ui/cordova/localassetmanager.js b/dashboard-ui/cordova/localassetmanager.js index 4b9adfa296..fb1b30ecc1 100644 --- a/dashboard-ui/cordova/localassetmanager.js +++ b/dashboard-ui/cordova/localassetmanager.js @@ -886,7 +886,7 @@ var deferred = DeferredBuilder.Deferred(); - if ($.browser.android) { + if (browserInfo.android) { deferred.resolveWith(null, ['file://' + path]); return deferred.promise(); } diff --git a/dashboard-ui/cordova/registrationservices.js b/dashboard-ui/cordova/registrationservices.js index 521d9f5042..23afa33dfb 100644 --- a/dashboard-ui/cordova/registrationservices.js +++ b/dashboard-ui/cordova/registrationservices.js @@ -22,7 +22,7 @@ } : null; - var prefix = $.browser.android ? 'android' : 'ios'; + var prefix = browserInfo.android ? 'android' : 'ios'; IapManager.isUnlockedOverride(feature).then(function (isUnlocked) { @@ -430,7 +430,7 @@ Events.on(IapManager, 'productupdated', onProductUpdated); } - if ($.browser.android) { + if (browserInfo.android) { requirejs(['cordova/android/iap'], onIapManagerLoaded); } else { requirejs(['cordova/iap'], onIapManagerLoaded); diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js index 681ef5bdc2..c2b04b0cbc 100644 --- a/dashboard-ui/scripts/actionsheet.js +++ b/dashboard-ui/scripts/actionsheet.js @@ -54,7 +54,7 @@ } // There seems to be a bug with this in safari causing it to immediately roll up to 0 height - var isScrollable = !$.browser.safari; + var isScrollable = !browserInfo.safari; if (isScrollable) { html += ''; @@ -108,7 +108,7 @@ }); // Seeing an issue in some non-chrome browsers where this is requiring a double click - var eventName = $.browser.chrome || $.browser.safari ? 'click' : 'mousedown'; + var eventName = browserInfo.chrome || browserInfo.safari ? 'click' : 'mousedown'; $('.actionSheetMenuItem', dlg).on(eventName, function () { diff --git a/dashboard-ui/scripts/appsettings.js b/dashboard-ui/scripts/appsettings.js index 023e2a302e..14490f742e 100644 --- a/dashboard-ui/scripts/appsettings.js +++ b/dashboard-ui/scripts/appsettings.js @@ -68,7 +68,7 @@ return val != 'false'; } - if ($.browser.mobile) { + if (browserInfo.mobile) { return false; } diff --git a/dashboard-ui/scripts/favorites.js b/dashboard-ui/scripts/favorites.js index 87a779c26c..0e3fc74348 100644 --- a/dashboard-ui/scripts/favorites.js +++ b/dashboard-ui/scripts/favorites.js @@ -1,7 +1,7 @@ (function ($, document) { function enableScrollX() { - return $.browser.mobile && AppInfo.enableAppLayouts; + return browserInfo.mobile && AppInfo.enableAppLayouts; } function getThumbShape() { diff --git a/dashboard-ui/scripts/homeupcoming.js b/dashboard-ui/scripts/homeupcoming.js index 794bdc4a15..ee4b1869e7 100644 --- a/dashboard-ui/scripts/homeupcoming.js +++ b/dashboard-ui/scripts/homeupcoming.js @@ -36,7 +36,7 @@ } function enableScrollX() { - return $.browser.mobile && AppInfo.enableAppLayouts; + return browserInfo.mobile && AppInfo.enableAppLayouts; } function getThumbShape() { diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index d26f226d9c..0089e6ae8f 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -137,7 +137,7 @@ // Appending #t=xxx to the query string doesn't seem to work with HLS if (startPositionInSeekParam && src.indexOf('.m3u8') != -1) { - var delay = $.browser.safari ? 2500 : 0; + var delay = browserInfo.safari ? 2500 : 0; var element = this; if (delay) { setTimeout(function () { @@ -202,10 +202,10 @@ var requiresNativeControls = !self.enableCustomVideoControls(); // Safari often displays the poster under the video and it doesn't look good - var poster = !$.browser.safari && options.poster ? (' poster="' + options.poster + '"') : ''; + var poster = !browserInfo.safari && options.poster ? (' poster="' + options.poster + '"') : ''; // Can't autoplay in these browsers so we need to use the full controls - if (requiresNativeControls && AppInfo.isNativeApp && $.browser.android) { + if (requiresNativeControls && AppInfo.isNativeApp && browserInfo.android) { html += '