From 1dd3096f377f04b9a8c84163a54a9aa9b6d3f909 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 4 Mar 2019 20:40:13 +0000 Subject: [PATCH 1/5] Update src/scripts/site.js i agree, definitely more readable Co-Authored-By: vitorsemeano --- src/scripts/site.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/scripts/site.js b/src/scripts/site.js index f02e63a221..3773e8896b 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -1146,7 +1146,15 @@ var AppInfo = {}; function loadPlugins(externalPlugins, appHost, browser, shell) { console.log("Loading installed plugins"); - var list = ["bower_components/emby-webcomponents/playback/playbackvalidation", "bower_components/emby-webcomponents/playback/playaccessvalidation", "bower_components/emby-webcomponents/playback/experimentalwarnings", "bower_components/emby-webcomponents/htmlaudioplayer/plugin", "bower_components/emby-webcomponents/htmlvideoplayer/plugin", "bower_components/emby-webcomponents/photoplayer/plugin", "bower_components/emby-webcomponents/youtubeplayer/plugin"]; + var list = [ + "bower_components/emby-webcomponents/playback/playbackvalidation", + "bower_components/emby-webcomponents/playback/playaccessvalidation", + "bower_components/emby-webcomponents/playback/experimentalwarnings", + "bower_components/emby-webcomponents/htmlaudioplayer/plugin", + "bower_components/emby-webcomponents/htmlvideoplayer/plugin", + "bower_components/emby-webcomponents/photoplayer/plugin", + "bower_components/emby-webcomponents/youtubeplayer/plugin" + ]; if ("cordova" === self.appMode) { list.push("cordova/chromecast"); From 6a15acb310a503cfc4081c56bf6b85b45650659e Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 4 Mar 2019 20:43:37 +0000 Subject: [PATCH 2/5] Update src/scripts/site.js well the tool can't make all the coding, am i right? Co-Authored-By: vitorsemeano --- src/scripts/site.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/site.js b/src/scripts/site.js index 3773e8896b..69dfe6703d 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -1194,7 +1194,7 @@ var AppInfo = {}; } function enableNativeGamepadKeyMapping() { - if (!(!window.navigator || "string" != typeof window.navigator.gamepadInputEmulation)) { + if (window.navigator && "string" == typeof window.navigator.gamepadInputEmulation) { window.navigator.gamepadInputEmulation = "keyboard"; return true; } From ff07a77133848af8faf79fea84dfbae42c96cfa5 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 4 Mar 2019 20:44:27 +0000 Subject: [PATCH 3/5] Update src/scripts/site.js Co-Authored-By: vitorsemeano --- src/scripts/site.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/site.js b/src/scripts/site.js index 69dfe6703d..527b71175d 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -1239,7 +1239,7 @@ var AppInfo = {}; require(["bower_components/emby-webcomponents/thememediaplayer", "scripts/autobackdrops"]); - if (!("cordova" !== self.appMode && "android" !== self.appMode)) { + if ("cordova" === self.appMode || "android" === self.appMode) { if (browser.android) { require(["cordova/mediasession", "cordova/chromecast", "cordova/appshortcuts"]); } else if (browser.safari) { From 8d7fa1557f66d4cd9aab8d3a7d86efc83a9d94f2 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 4 Mar 2019 20:45:19 +0000 Subject: [PATCH 4/5] Update src/scripts/site.js Co-Authored-By: vitorsemeano --- src/scripts/site.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/site.js b/src/scripts/site.js index 527b71175d..5ce5328139 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -1247,7 +1247,7 @@ var AppInfo = {}; } } - if (!(browser.tv || browser.xboxOne || browser.ps4)) { + if (!browser.tv && !browser.xboxOne && !browser.ps4) { require(["bower_components/emby-webcomponents/nowplayingbar/nowplayingbar"]); } From 64c3c15af4605e5e740edac6287874e86b72fee4 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 4 Mar 2019 20:45:44 +0000 Subject: [PATCH 5/5] Update src/scripts/site.js Co-Authored-By: vitorsemeano --- src/scripts/site.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/site.js b/src/scripts/site.js index 5ce5328139..e9843f90f2 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -1265,7 +1265,7 @@ var AppInfo = {}; require(["apiInput", "mouseManager"]); - if (!(browser.tv || browser.xboxOne)) { + if (!browser.tv && !browser.xboxOne) { require(["bower_components/emby-webcomponents/playback/playbackorientation"]); registerServiceWorker();