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-75d572ba1dddmaster
parent
be04bdc1c1
commit
64c7fa5f9f
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue