The only part of the tw api defined in the boot prefix is the modules 
system. This can be used to conditionally create a startup module that will 
change tiddlers:


if (/* time is between 1 and 5*/){
$tw.modules.define("my_startup","startup",
    function(module,exports,require){

    /*jslint node: true, browser: true */
    /*global $tw: false */
    "use strict";

    // Export name and synchronous status
    exports.name = "mystartup";
    exports.after = ["startup"];
    exports.synchronous = true;


    exports.startup = function() {
        
        /*changes to tiddlers*/
        
    }
    return exports;
});

all the best 
BJ

On Sunday, December 18, 2016 at 9:22:25 PM UTC+1, Siniy-Kit 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].
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/6a2590e5-323d-4bc2-bc3e-b3cd5790f63e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to