Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Should not try to operate on readOnly TiddlyWikis #18

Open
JohnHind opened this issue Mar 25, 2014 · 3 comments
Open

Should not try to operate on readOnly TiddlyWikis #18

JohnHind opened this issue Mar 25, 2014 · 3 comments

Comments

@JohnHind
Copy link

Should include a test for "not readOnly" before asking for permission to inject the saver code. At present I am having to manually edit the versionArea script section to stop browsers with TiddlyFox installed spuriously bothering users for permission to load the saver to read-only TWs!

@Jermolene
Copy link
Member

Hi @JohnHind aha, interesting problem! Presumably you are distributing the TW's via a file:// URI?

TiddlyFox only does it's stuff after the TW file has loaded, so it would certainly be possible to add a check the readOnly global.

We'd need to also make it possible to restore saving; I guess if someone has a zzConfig tiddler that enforces readOnly mode then they'd still be able to use a paramifier to override it.

@JohnHind
Copy link
Author

Yes, I've used it for the documentation file in my Winsh.lua project here:

https://github.com/JohnHind/Winsh.lua/blob/master/Doc/Winsh.html

I maintain source and published versions and "publishing" is a one-way operation so once readOnly is set that file never needs saving again. But I see that others may want to be able to clear the flag and save.

Would it be safe to postpone the permission request until a save is actually first attempted?

@Jermolene
Copy link
Member

Would it be safe to postpone the permission request until a save is actually first attempted?

That would be great, and I think could be done fairly straightforwardly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants