But looking at your previous post it looks like you already had the
field module-type correctly set to startup...
On 18.02.2015 03:01, yun.zho...@gmail.com wrote:
Ok, figured it out. In case anyone else runs into this issue, there
needs to be a field called module-type in the tiddler... Should have
guessed that.
On Tuesday, February 17, 2015 at 5:09:27 PM UTC-6, yun.z...@gmail.com
wrote:
Hmmm... so I added it but I'm not seeing a change. Just to be
clear, boot.js is supposed to execute the $tw.wiki.addTiddler on
startup in this case right? I don't have to make a reference
somewhere else?
|/*\
title: $:/plugins/name/defineuser/setusername.js
type: application/javascript
module-type: startup
Adds the given username to the username for signing
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name <http://exports.name> = "setusername";
exports.platforms = ["browser"];
exports.after = ["startup"];
exports.before = ["rootwidget"];
exports.synchronous = true;
exports.startup = function() {
$tw.wiki.addTiddler(new $tw.Tiddler({title: "$:/status/UserName", text:
"Joel"}));
};
})();|
On Tuesday, February 17, 2015 at 4:59:10 PM UTC-6, Felix Küppers
wrote:
Hi,
I think you need to add some more instructions like
exports.name <http://exports.name> = "blabla";
exports.platforms = ["browser"];
exports.after = ["startup"];
exports.before = ["rootwidget"];
exports.synchronous = true;
-felix
On 17.02.2015 23:38, yun.z...@gmail.com wrote:
Hello all,
I am still very new to TW5 so this might be an easy question.
I am trying to write a plugin that will modify the
$:/status/UserName tiddler based on credentials from a server
but I can't seem to get the boot.js to load this module?
Maybe I just don't understand how startup modules are
supposed to work... any ideas?
|/*\
title: $:/plugins/name/defineuser/setusername.js
type: application/javascript
module-type: startup
Adds the given username to the username for signing
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.startup = function() {
$tw.wiki.addTiddler(new $tw.Tiddler({title: "$:/status/UserName", text:
"Joel"}));
};
})();|
--
You received this message because you are subscribed to the
Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at
http://groups.google.com/group/tiddlywikidev
<http://groups.google.com/group/tiddlywikidev>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to tiddlywikidev+unsubscr...@googlegroups.com
<mailto:tiddlywikidev+unsubscr...@googlegroups.com>.
To post to this group, send email to tiddlywikidev@googlegroups.com
<mailto:tiddlywikidev@googlegroups.com>.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.