From 9ea2d4c86f07bd2be449d06c31ab30960bc24c47 Mon Sep 17 00:00:00 2001 From: daserge Date: Thu, 6 Aug 2015 20:54:50 +0300 Subject: [PATCH] CB-9467 SplashScreen does not show any image in hosted app on Windows 10 --- www/windows/SplashScreenProxy.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/windows/SplashScreenProxy.js b/www/windows/SplashScreenProxy.js index dab7238..271a14c 100644 --- a/www/windows/SplashScreenProxy.js +++ b/www/windows/SplashScreenProxy.js @@ -26,9 +26,11 @@ var cordova = require('cordova'), channel = require('cordova/channel'); var isPhone = (cordova.platformId == "windows") && WinJS.Utilities.isPhone; -var localSplash = null; +var isHosted = window.location.protocol.indexOf('http') === 0; +var localSplash = null; var bgColor = "#464646"; // default backgrond color; TDOO - read it from .appxmanifest -var splashImageSrc = isPhone ? "ms-appx:///images/splashscreenphone.png" : "ms-appx:///images/splashscreen.png"; +var splashImageSrc = (isHosted ? "ms-appx-web" : "ms-appx") + ":///images/" + + (isPhone ? "splashscreenphone.png" : "splashscreen.png"); var SplashScreen = { setBGColor: function (cssBGColor) {