TiddlyFox icon indicating copy to clipboard operation
TiddlyFox copied to clipboard

Should not try to operate on readOnly TiddlyWikis

Open JohnHind opened this issue 11 years ago • 3 comments
trafficstars

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!

JohnHind avatar Mar 25 '14 11:03 JohnHind

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.

Jermolene avatar Mar 26 '14 21:03 Jermolene

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?

JohnHind avatar Mar 27 '14 09:03 JohnHind

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.

Jermolene avatar Mar 27 '14 09:03 Jermolene