Ensure top URL will change in case it wishes to react according to storagePrompt param (such as in the embedded editor).
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2722 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
86800563ff
commit
dd9e3b4864
|
@ -48,13 +48,14 @@ svgEditor.addExtension('storage', function() {
|
|||
|
||||
function replaceStoragePrompt (val) {
|
||||
val = val ? 'storagePrompt=' + val : '';
|
||||
if (window.location.href.indexOf('storagePrompt=') > -1) {
|
||||
window.location.href = window.location.href.replace(/([&?])storagePrompt=[^&]*(&?)/, function (n0, n1, amp) {
|
||||
var loc = top.location; // Allow this to work with the embedded editor as well
|
||||
if (loc.href.indexOf('storagePrompt=') > -1) {
|
||||
loc.href = loc.href.replace(/([&?])storagePrompt=[^&]*(&?)/, function (n0, n1, amp) {
|
||||
return (val ? n1 : '') + val + (!val && amp ? n1 : (amp || ''));
|
||||
});
|
||||
}
|
||||
else {
|
||||
window.location.href += (window.location.href.indexOf('?') > -1 ? '&' : '?') + val;
|
||||
loc.href += (loc.href.indexOf('?') > -1 ? '&' : '?') + val;
|
||||
}
|
||||
}
|
||||
function setSVGContentStorage (val) {
|
||||
|
|
Loading…
Reference in New Issue