XiozZe / XioScript

XioScript
11 stars 16 forks source link

Export/Import #57

Closed TeaMike closed 6 years ago

TeaMike commented 8 years ago

Could this backup function, conveniently, be made thru a file from/to the desktop?

I've tried to import something to see if it overwrites the existing but nothing happened after clicking "save!".

XiozZe commented 8 years ago

To the desktop could be possible. From the desktop however is restricted due to privacy. (You don't want a script that can access your desktop).

If nothing happens after clicking save, your text is corrupted.

Can you test it a few times by exporting-importing to different browsers?

TeaMike commented 8 years ago

going trough "open/select file" just like uploading an image to free image host, and a "save to" dialogue would probably be safe.

I've copy-pasted export settings from safari to chrome, seems to have worked but there's no confirmation. What happens with duplicate instructions in this case now? How can i wipe the data stored in the local storage?

XiozZe commented 8 years ago

I'll see what I can do.

You can clear your localStorage (FF/Chrome) by putting this line of code in the console log:

for(var key in localStorage) localStorage.removeItem(key)

After you have pressed "save", the page should reload, or show in the console log that the import was unsuccessful. The Import function overrides any options you have set, but does not delete options.

TeaMike commented 8 years ago

Does that delete ALL local storage or only the entries by XS?

XiozZe commented 8 years ago

All.

Need something more specific?

for(var key in localStorage) key[0] === "x" && localStorage.removeItem(key)

That's for XS entries only.

TeaMike commented 8 years ago

yes, thats great coz i've got other scripts using ls.

Thank you Sir and don't forget looking for the easter nest ;)

TeaMike commented 7 years ago

I hope proper backup e.g. Import/Export is available in the next XS version

XiozZe commented 6 years ago

And it is. I don't even have to do anything for it. XS14 is an add-on and if you sign in in Firefox you can sync your add-on settings.