@jupyterlab/filebrowser
Advanced tools
Comparing version 1.0.0-alpha.13 to 1.0.0-rc.0
@@ -266,10 +266,18 @@ // Copyright (c) Jupyter Development Team. | ||
return this.manager.services.contents.getDownloadUrl(path).then(url => { | ||
let element = document.createElement('a'); | ||
document.body.appendChild(element); | ||
element.setAttribute('href', url); | ||
element.setAttribute('target', '_blank'); | ||
element.setAttribute('download', ''); | ||
element.click(); | ||
document.body.removeChild(element); | ||
return void 0; | ||
// Check the browser is Chrome https://stackoverflow.com/a/9851769 | ||
const chrome = window.chrome; | ||
const isChrome = !!chrome && (!!chrome.webstore || !!chrome.runtime); | ||
if (isChrome) { | ||
// Workaround https://bugs.chromium.org/p/chromium/issues/detail?id=455987 | ||
window.open(url); | ||
} | ||
else { | ||
let element = document.createElement('a'); | ||
document.body.appendChild(element); | ||
element.setAttribute('href', url); | ||
element.setAttribute('download', ''); | ||
element.click(); | ||
document.body.removeChild(element); | ||
return void 0; | ||
} | ||
}); | ||
@@ -276,0 +284,0 @@ } |
{ | ||
"name": "@jupyterlab/filebrowser", | ||
"version": "1.0.0-alpha.13", | ||
"version": "1.0.0-rc.0", | ||
"description": "JupyterLab - FileBrowser Widget", | ||
@@ -38,8 +38,8 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@jupyterlab/apputils": "^1.0.0-alpha.13", | ||
"@jupyterlab/coreutils": "^3.0.0-alpha.13", | ||
"@jupyterlab/docmanager": "^1.0.0-alpha.13", | ||
"@jupyterlab/docregistry": "^1.0.0-alpha.13", | ||
"@jupyterlab/services": "^4.0.0-alpha.13", | ||
"@jupyterlab/statusbar": "^1.0.0-alpha.13", | ||
"@jupyterlab/apputils": "^1.0.0-rc.0", | ||
"@jupyterlab/coreutils": "^3.0.0-rc.0", | ||
"@jupyterlab/docmanager": "^1.0.0-rc.0", | ||
"@jupyterlab/docregistry": "^1.0.0-rc.0", | ||
"@jupyterlab/services": "^4.0.0-rc.0", | ||
"@jupyterlab/statusbar": "^1.0.0-rc.0", | ||
"@phosphor/algorithm": "^1.1.3", | ||
@@ -63,3 +63,3 @@ "@phosphor/coreutils": "^1.3.1", | ||
}, | ||
"gitHead": "6902480eee213e58fb0b51ce28faa1c057dbc45e" | ||
"gitHead": "1312f392be42866b0afd5bbc4bf1ff18d70d8ee0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142649
37483
4283
8
50