Jeremy:
In TiddlyWiki 2.0.3 there are some locations that use a global variable
where a local variable is probably intended (i.e. missing "var"). Here
is what I found:
1+2) function detectPlugin() // Lifted from
http://developer.apple.com/internet/webcontent/detectplugins.html
for (
pluginsArrayCounter=0; pluginsArrayCounter <
pluginsArrayLength; pluginsArrayCounter++ )
...
for(
namesCounter=0; namesCounter <
daPlugins.length; namesCounter++)
3) Story.prototype.createTiddler =
function(place,before,title,template)
{
theTiddler = createTiddlyElement(null,"div",this.idPrefix
+ title,"tiddler",null);
4) TiddlyWiki.prototype.createTiddler = function(title)
{
tiddler = this.fetchTiddler(title);
5) Number.prototype.clamp = function(min,max)
{
c = this;
6) config.macros.list.handler = function(place,macroName,params)
{
var type = params[0] ? params[0] : "all";
...
if(this[type].handler)
results = this[type].handler(params);
for (
t = 0; t < results.length; t++)
7) config.macros.allTags.handler = function(place,macroName,params)
{
var tags = store.getTags();
...
for (
t=0; t<tags.length; t++)
8) config.macros.timeline.handler = function(place,macroName,params)
{
....
var c = 0;
for (
t=tiddlers.length-1; t>=0; t--)
9) config.macros.gradient.handler =
function(place,macroName,params,wikifier)
{
...
if(wikifier)
{
var styles = config.formatterHelpers.inlineCssHelper(wikifier);
var t; // scope?
for(t=0; t<styles.length; t++)
panel.style[styles[t].style] = styles[t].value;
}
var colours = [];
for(
t=1; t<params.length; t++)
10) function applyPageTemplate(title)
...
if(display)
{
nodes = display.childNodes;
for(
var t=nodes.length-1; t>=0; t--)
//scope?
stash.appendChild(nodes[t]);
}
...
nodes = stash.childNodes;
for(
t=nodes.length-1; t>=0; t--)
display.appendChild(nodes[t]);
11) Wikifier.prototype.subWikify = function(output,terminator)
this.matchText = formatterMatch[0];
this.nextMatch = this.formatter.formatterRegExp.lastIndex;
// Figure out which formatter matched
var matchingformatter = -1;
// Typo! lower
...formatter vs. ...Formatter
for(var t=1; t<formatterMatch.length; t++)
if(formatterMatch[t])
matchingFormatter = t-1;
// Call the formatter
The fixes should be easy.
(I hope you read this email with HTML formatting, since I marked the
locations bold).
Udo