]> khamidou — GitHub mirrors - electron.git/commitdiff
Cleanup usaages of asar: protocol
authorCheng Zhao <zcbenz@gmail.com>
Sun, 1 Feb 2015 02:50:26 +0000 (18:50 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 1 Feb 2015 02:50:26 +0000 (18:50 -0800)
atom/renderer/lib/init.coffee
atom/renderer/lib/web-view/web-view-attributes.coffee
atom/renderer/lib/web-view/web-view-constants.coffee

index b9067746275397d0cf7d4526a405c01f69157c7c..1d900ad349b1b6dc88120178fbd965d74c63fd82 100644 (file)
@@ -60,8 +60,8 @@ if nodeIntegration in ['true', 'all', 'except-iframe', 'manual-enable-iframe']
   global.require = require
   global.module = module
 
-  # Set the __filename to the path of html file if it's file: or asar: protocol.
-  if window.location.protocol in ['file:', 'asar:']
+  # Set the __filename to the path of html file if it is file: protocol.
+  if window.location.protocol is 'file:'
     pathname =
       if process.platform is 'win32' and window.location.pathname[0] is '/'
         window.location.pathname.substr 1
index 00d076cdd8aa47fbf83d6eda39d6e1297c4e0a26..e4b5dcb45bda268328be10e1152211e9fefb744c 100644 (file)
@@ -179,7 +179,7 @@ class PreloadAttribute extends WebViewAttribute
     return '' unless @webViewImpl.webviewNode.hasAttribute @name
     preload = resolveUrl @webViewImpl.webviewNode.getAttribute(@name)
     protocol = preload.substr 0, 5
-    unless protocol in ['file:', 'asar:']
+    unless protocol is 'file:'
       console.error webViewConstants.ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE
       preload = ''
     preload
index dd808f68775af44ba4a26d6978b8606af793ed0d..cda715423dd450f5dd94e1df9f9db4a6fb80171b 100644 (file)
@@ -23,4 +23,4 @@ module.exports =
   ERROR_MSG_CANNOT_INJECT_SCRIPT: '<webview>: ' +
       'Script cannot be injected into content until the page has loaded.'
   ERROR_MSG_INVALID_PARTITION_ATTRIBUTE: 'Invalid partition attribute.'
-  ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE: 'Only "file:" or "asar:" protocol is supported in "preload" attribute.'
+  ERROR_MSG_INVALID_PRELOAD_ATTRIBUTE: 'Only "file:" protocol is supported in "preload" attribute.'