cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject [2/4] spec commit: CB-9066 Minor refactopring: windows8->windows
Date Wed, 27 May 2015 13:27:22 GMT
CB-9066 Minor refactopring: windows8->windows


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/aea96761
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/aea96761
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/aea96761

Branch: refs/heads/master
Commit: aea967614db19725380d14bbbc0e45268bd62438
Parents: 33ccc00
Author: sgrebnov <v-segreb@microsoft.com>
Authored: Wed May 27 16:23:34 2015 +0300
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Wed May 27 16:23:34 2015 +0300

----------------------------------------------------------------------
 www/csp-incl.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/aea96761/www/csp-incl.js
----------------------------------------------------------------------
diff --git a/www/csp-incl.js b/www/csp-incl.js
index 669e77f..b84dff3 100644
--- a/www/csp-incl.js
+++ b/www/csp-incl.js
@@ -31,7 +31,7 @@ var PLAT;
         // than to Windows phone 8 we need to detect it separately.
         windowsphone81: /Windows Phone 8.1/,
         windowsphone: /Windows Phone/,
-        windows8: /MSAppHost/,
+        windows: /MSAppHost/,
         firefoxos: /Firefox/
     };
     for (var key in platforms) {
@@ -49,7 +49,7 @@ if (!window._disableCSP) {
     switch (PLAT) {
         case 'android':
         case 'ios':
-        case 'windows8':
+        case 'windows':
             cspMetaContent = 'default-src \'self\' https://ssl.gstatic.com/accessibility/javascript/android/;'
+
                             ' connect-src \'self\' http://cordova-filetransfer.jitsu.com;'
+
                             ' media-src \'self\' http://cordova.apache.org/downloads/;' +
@@ -61,7 +61,7 @@ if (!window._disableCSP) {
 
     if (cspMetaContent) {
         cspMetaContent = '<meta http-equiv="Content-Security-Policy" content="' + cspMetaContent
+ '"/>';
-        if (PLAT == 'windows8') {
+        if (PLAT === 'windows' && MSApp && MSApp.execUnsafeLocalFunction)
{
             MSApp.execUnsafeLocalFunction(function () {
                 document.write(cspMetaContent);
             });


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


Mime
View raw message