Fix Issue 65: Launch SVG-edit with ?url=foo/bar.svg

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1296 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2010-01-29 05:53:01 +00:00
parent be04bdc1c1
commit 64c7fa5f9f
1 changed files with 14 additions and 0 deletions

View File

@ -2619,6 +2619,20 @@ function svg_edit_setup() {
var src = loc.substring(loc.indexOf(pre) + pre.length);
svgCanvas.setSvgString(Utils.decode64(src));
}
else if(loc.indexOf('?url=') != -1) {
var pre = '?url=';
var url = loc.substring(loc.indexOf(pre) + pre.length);
$.ajax({
'url': url,
'dataType': 'text',
success: svgCanvas.setSvgString,
error: function(xhr) {
if(xhr.responseText) {
svgCanvas.setSvgString(xhr.responseText);
}
}
});
}
}
});
}());