[tw5] Re: How to prevent "This page is asking you to confirm that you want to leave - data you have entered may not be saved" ?

2020-04-14 Thread Lin Onetwo
Hi Tony, that seems not working, may due to the fact that I'm using 
SyncAdaptor instead of Syncer.

I finally made a plugin to prevent that popup:

plugin.info:

{
  "title": "$:/plugins/linonetwo/prevent-pop-up",
  "description": "Prevent \"This page is asking you to confirm that you 
want to leave\" in a read-only site",
  "author": "Lin Onetwo",
  "core-version": ">=5.0.0"
}

preventPopUp.js.tid:

created: 20200414150455988
creator: LinOnetwo
module-type: startup
title: preventPopUp.js
type: application/javascript

And add it to plugins:

"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/highlight",
"sitemap",
"prevent-pop-up"
],

Then it works...
exports.startup = function() {
$tw.unloadTasks = $tw.unloadTasks.filter(task => 
!task.toString().includes('confirmationMessage'));
}



在 2020年4月12日星期日 UTC+8上午8:49:43,TonyM写道:
>
> Lin
>
> In the most recent releases there is a save filter that determines when to 
> activate autosave or the dirty indicator which says save is necessary and 
> what to save.
>
> See $:/core/save/all
>
> The trick will be to change this then save before publishing. I thing an 
> independent save method will be needed so you can save or export a copy of 
> the wiki without the save settings you change.
>
> Regards
> Tont
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/85d34cda-11f4-4729-878d-78bfc7393359%40googlegroups.com.


[tw5] Re: How to prevent "This page is asking you to confirm that you want to leave - data you have entered may not be saved" ?

2020-04-11 Thread TonyM
Lin

In the most recent releases there is a save filter that determines when to 
activate autosave or the dirty indicator which says save is necessary and what 
to save.

See $:/core/save/all

The trick will be to change this then save before publishing. I thing an 
independent save method will be needed so you can save or export a copy of the 
wiki without the save settings you change.

Regards
Tont

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4672e0e5-0d36-406b-9c51-2b9704403be1%40googlegroups.com.