Remove go to [TOP] from DcTableOfContentsPlugin?

2 views
Skip to first unread message

FLX

unread,
Nov 5, 2009, 10:29:54 AM11/5/09
to TiddlyWikiDev
Hello,

I use a modifiied version of the DcTableOfContentsPlugin. Source here:
http://pastebin.com/f451c6c3
I like the way it redirects me to the appropriate header when I click
on it, but I don't like the fact that it has [TOP] with every header.
How can I remove this?

I removed the line:
createTiddlyButton(c, " [top]", "Go to top of tiddler",
window.scrollToTop, "dcTOCTop", null, null);

But that results in that it doesnt redirect to the header when
clicking on a iten in the TOC list.

Thanks!

Dennis

FND

unread,
Nov 6, 2009, 5:38:27 AM11/6/09
to tiddly...@googlegroups.com
> I like the way it redirects me to the appropriate header when I click
> on it, but I don't like the fact that it has [TOP] with every header.
> [...]

> I removed the line:
> createTiddlyButton(c, " [top]", "Go to top of tiddler",
> window.scrollToTop, "dcTOCTop", null, null);

You could probably just replace " [top]" with "" in that line.

(When modifying a plugin, you should highlight that fact somewhere at
the top of your tiddler to prevent confusion.)


-- F.


FLX

unread,
Nov 9, 2009, 5:52:44 AM11/9/09
to TiddlyWikiDev
Thanks FND, but that didn't work. I eventually settled by making the
[TOP] text invisible via css: c.setAttribute("style", "font-size:
0.5em; display: none;");

Thanks,

Dennis

p.s: I don't know why, but I submitted this a week before I emailed
you about it.
Reply all
Reply to author
Forward
0 new messages