Thank you Jeremy and Mario. And how can I create signal tiddler with yes or
no text value?
return new $tw.Tiddler("$:/_FlagSpecialCss",{"text": "yes"}); ??? the is
no example how to use this hook.
воскресенье, 18 декабря 2016 г., 23:32:55 UTC+3 пользователь Jeremy Ruston
написал:
> Hi Sini-kit
>
> Perhaps a simpler way would be to have your bootprefix code update a
> tiddler $:/_FlagSpecialCss to have the value “yes” when the time is between
> 1 and 5, and “no” otherwise. Then in your stylesheet tiddler, use a reveal
> widget something like the example below.
>
> Best wishes
>
> Jeremy
>
> \define if-special-time(then,else)
> <$reveal state="$:/_FlagSpecialCss" type="match" text="yes" default="no">
> $then$
> </$reveal>
> <$reveal state="$:/_FlagSpecialCss" type="match" text="no" default="no">
> $else$
> </$reveal>
> \end
>
> \rules only filteredtranscludeinline transcludeinline macrodef
> macrocallinline macrocallblock
>
> <<if-special-time then:"""
>
> .rule-for-special-times {
> color: red;
> }
>
> """
> else: """
>
> .rule-for-not-special-times {
> color: green;
> }
>
> """>>
>
>
> On 18 Dec 2016, at 20:22, Siniy-Kit <[email protected] <javascript:>>
> wrote:
>
> Hi! I am writing a little script to $:/boot/bootprefix.js. This script
> connects to other site time API, get time from it and if hours in this time
> between 1 and 5 it must change css styles of tw5
> so I want this script to add tag $:/tags/Stylesheet to mycssstyle
> tiddler. I write the first part with time, but don't know TW5 function to
> add tag to tiddler
>
> found
>
> FieldManglerWidget.prototype.handleRemoveTagEvent = function(event)
>
> FieldManglerWidget.prototype.handleAddTagEvent = function(event)
>
>
> but I don't understand how to use this functions.
>
> --
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/77dfdaa8-224f-444d-9613-94cc7bdceb19%40googlegroups.com
>
> <https://groups.google.com/d/msgid/tiddlywiki/77dfdaa8-224f-444d-9613-94cc7bdceb19%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/fa234d32-dbb0-4ae0-9afa-156bfe8153b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.