like newJournal macro, but for tweets
config.macros.newTweet = {
locale: {
label: "new tweet",
tooltip: "Create new status message"
},
handler: function(place, macroName, params, wikifier, paramString, tiddler) {
if(readOnly) {
return;
}
params = paramString.parseParams("anon", null, true, false, false);
params.push({ name: "tag", value: "tweet" });
var hash = new Date().toString();
hash = jQuery.encoding.digests.hexSha1Str(hash);
var title = hash.substr(0, 32).toLowerCase(); // 40 chars seemed excessive
config.macros.newTiddler.createNewTiddlerButton(place, title, params,
this.locale.label, this.locale.tooltip, this.accessKey, "text");
}
};