How to prevent TW5 to send (false) signal to the browser ?

57 views
Skip to first unread message

ParisWiki

unread,
Jan 31, 2016, 12:31:43 PM1/31/16
to TiddlyWiki
Hello,

I intend to use a read-only TW5 for non techies users with a quizz  the answers of which  are sent by mail to me (via the  Formspree platform,  https://formspree.io/).

But TW5 is too zealous in that case and browsers (Chrome and Firefox at least) alert the reader that closing the windows without saving the wiki may inccur loss of data.

I am guessing that this alert is triggered by TW. If  this is the case, how can I prevent such a message in a read only wiki ?

Thank you,

JCG

Jed Carty

unread,
Jan 31, 2016, 1:57:45 PM1/31/16
to TiddlyWiki
The easiest way to prevent that is to make your wiki use put all state data in tiddlers with titles prefixed with '$:/state/' or '$:/temp/'.
I am sure there is a way to turn off the notification but I don't know what it is and if you can change use the tiddler naming convention it would be better.

Eric Shulman

unread,
Jan 31, 2016, 2:28:44 PM1/31/16
to TiddlyWiki
On Sunday, January 31, 2016 at 10:57:45 AM UTC-8, Jed Carty wrote:
The easiest way to prevent that is to make your wiki use put all state data in tiddlers with titles prefixed with '$:/state/' or '$:/temp/'.
I am sure there is a way to turn off the notification but I don't know what it is and if you can change use the tiddler naming convention it would be better.


The system tiddler you want is:

   $:/config/SaverFilter

The default contents are:

[all[]] -$:/HistoryList -$:/StoryList -$:/Import -$:/isEncrypted -$:/UploadName -[prefix[$:/state/]] -[prefix[$:/temp/]]

and defines a filter that produces the list of tiddler that are to be checked for changes.  The filter starts with "[all[]]", which includes all *real* tiddlers (i.e., not shadows).  It then excludes specific named tiddlers and tiddlers that start with special names like $:/state/ and $:/temp/.

Anything tiddlers excluded from list will NOT cause the document to be considered 'dirty', even if the content of those tiddler have changed.

To exclude your own tiddlers, simply add more filter runs to the end.  Make sure to use the "-" prefix so that your matching tiddlers are removed from the list, instead of being added.

enjoy,
-e



ParisWiki

unread,
Jan 31, 2016, 3:25:59 PM1/31/16
to TiddlyWiki
Thank you so much Eric !

Best,

JCG
Reply all
Reply to author
Forward
0 new messages