You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2017/12/07 16:24:20 UTC

[GitHub] IndieSW commented on a change in pull request #244: CB-13641: (windows) allow for transparent splash screen background co?

IndieSW commented on a change in pull request #244: CB-13641: (windows) allow for transparent splash screen background co?
URL: https://github.com/apache/cordova-windows/pull/244#discussion_r155570174
 
 

 ##########
 File path: cordova-js-src/splashscreen.js
 ##########
 @@ -69,18 +69,21 @@ function readPreferencesFromCfg(cfg, manifest) {
         splashImageSrc = schema + ':///' + manifest.getSplashScreenImagePath().replace(/\\/g, '/');
 
         bgColor = cfg.getPreferenceValue('SplashScreenBackgroundColor') || bgColor;
-        bgColor = bgColor.replace('0x', '#').replace('0X', '#');
-        if (bgColor.length > 7) {
-            // Remove aplha
-            bgColor = bgColor.slice(0, 1) + bgColor.slice(3, bgColor.length);
-        }
+        bgColor = bgColor.toLowerCase().replace('0x', '#');
 
 Review comment:
   I had to force the case of bgColor to compare it to 'transparent' so I combined it with the replacement of '0x' and '0X'. bgColor is used as CSS color value which I believe is case-insensitive.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org