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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to