Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #49 from jdlrobson/ImportingIssues

prevent exception throwing when importing in chrome
  • Loading branch information...
commit 5c9592ffa7772c7f23c1e46d1ad2e2f6eaae4c03 2 parents 6d6a221 + f7d1283
@martinbudden martinbudden authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 js/Import.js
View
8 js/Import.js
@@ -99,15 +99,19 @@ config.macros.importTiddlers.onFeedChange = function(e)
config.macros.importTiddlers.onBrowseChange = function(e)
{
var wizard = new Wizard(this);
+ var file = this.value;
if(this.files && this.files[0]) {
+ file = this.files[0].fileName;
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
+ if(typeof(netscape) !== "undefined") {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");
+ }
} catch (ex) {
showException(ex);
}
}
var fileInput = wizard.getElement("txtPath");
- fileInput.value = config.macros.importTiddlers.getURLFromLocalPath(this.value);
+ fileInput.value = config.macros.importTiddlers.getURLFromLocalPath(file);
var serverType = wizard.getElement("selTypes");
serverType.value = "file";
return true;
Please sign in to comment.
Something went wrong with that request. Please try again.