On Feb 2, 9:14 pm, Yakov <yakov.litvin.publi...@gmail.com> wrote:
> It is known that the
>
> <html><a href="javascript:;"
> onclick="story.switchTheme(config.options.txtTheme)">apply</a></html>
>
> link "reprocess" the theme so that if the cookie value is changed, a
> new theme is applied. Now, how do I use OPTION and OPTGROUP elements
> to create a "select theme" ~popup (or how is it called?) which
> launches the reprocessing function when a theme is choosen by
> clicking?
>
> Also, what are the main reasons to use plugins for theme switching
> aside that they provide some macros (say, if I have a solution
> described above)?
May be, because a macro delivers, what you request above?

There is SwitchThemePlugin from TiddyTools, which has some init and
exit scripts, that can be executed if a theme is changed.
And SelectThemePlugin from Simon Baird (MPTW) can also change the
ColorPalette.

Both do what you suggest. Both have about 80 lines of code + inline
description. Both are automatically aware of new Themes, if a tiddler
is tagged systemTheme / systemPalette.

<html> inline code is imo "ugly". I won't use it, if a macro is
available.
<html> inline code may be filtered by TiddlySpace, like
{{tiddler.title}}

If your suggested solution uses less lines, and is as flexible, ....

-m

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to