On Mar 1, 9:23 am, RA <[email protected]> wrote:
> > That's odd. I haven't tested this, but if the respective plugin is
> > handling it correctly, an existing preference* should not be overridden.
>
> I'm not sure if it's a "preference". The only reference to it in the
> plugin is like this:
> <input type=checkbox class="chk" id="chkSync" ...>
> Is that enough for it to work as a preference?

Nope.  This checkbox is not a 'preference' (i.e., not stored as a
cookie).  It's default value is actually set directly by the plugin
code, and can be changed by setting:
   config.macros.importTiddlers.sync=true;

Normally, you would simply place this line into a tiddler named
"ImportTiddlersPluginConfig", tagged with 'systemConfig' (i.e., make
it a plugin).  Because plugins are loaded in alphabetic order,
ImportTiddlersPluginConfig will be invoked after ImportTiddlersPlugin,
thereby acting as an 'overlay'.

However, if you load ImportTiddlersPlugin 'on-the-fly' via a
bookmarklet, the value for 'sync' will be reset to the default
(=false) when that plugin code is loaded, so any change to the value
that you might have made (via the ...Config overlay tiddler) is
superseded.

Fortuately, there is an obvious solution: in order to re-apply the
custom settings, we need to ensure that ImportTiddlersPluginConfig is
re-invoked after ImportTiddlersPlugin has been loaded.

To accomplish this, I've made an update to
TiddlyTools' [[LoadRemotePlugin]] script so that it will accept a
tiddlername as an additional optional parameter.  If this tiddler is
present, then it will be automatically evaluated so that any JS code
it contains can be re-invoked as an overlay after the remote plugin is
loaded.

Thus, to fix your problem:
1) create [[ImportTiddlersPluginConfig]] as described above.  Note
that, for this specific use, you don't actually need to tag it with
systemConfig, since it will be invoked automatically when the remote
plugin is loaded, but it shouldn't cause any problems if it is also
tagged and invoked during document startup).

2) Drag a new copy of the "ImportTiddlers" instant bookmarklet link
directly from
   http://www.TiddlyTools.com/#InstantBookmarklets
so that the latest code is installed into your browser's toolbar
(replace the existing bookmarklet).

That should do it.  The next time you trigger the bookmarklet to
remote-load ImportTiddlersPlugin, the custom
ImportTiddlersPluginConfig present in your document will also get
invoked and your desired settings will then be re-applied.  QED.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to