Platonides <Platonides@...> writes: ....
Isn't "ToC < >" a bit intruding? While i agree linking back to the Toc is useful, i can do it with the "back" option at my browser.
How does the hotkey interact with input fields? I answer myself, you tell down that it needs another hook to skip them.
Yes, with input fields we can either track what kind of object got the keystroke inside Javascript or we can insert extra hooks for the input fields. For MediaWiki purposes both approaches are equivalently straightforward since we can automatically format articles' html whichever way.
In terms of the Back button, yes, you can do it this way, but compare the amount of effort:
1. if you use scroll rapidly through with mouse and use it for clicking, then you would need to move it across half the screen on a regular basis.
2. if you scroll through with Page up/down keys (which is a situation I have considered both for desktop and laptop keyboard), you have to put the hand on the mouse and THEN move it across the screen. Or you can memorize the Back hotkey shortcut which requires both hands.
One way or the other, I do not believe that people do this on any regular basis. The whole point of TiggerScript is to make this toggling become popular, so simple as to become second nature whenever people browse text-rich articles.
By contrast, my method can be done entirely from keyboard with a single keystroke. People can learn it to do it as instinctively as Page up/down. Note that I located some of the hotkeys next to Page up/down to keep fingers there. It will require no extra thought or effort.
In fact, to reduce the thinking involved even further, TiggerScript could be rewritten to use a SINGLE hotkey for both toggle up and toggle down. That is, if ToC is visible, the hotkey toggles down, and if text visible, it toggles up. The reason why I have the hotkey pair right now is because this version of TiggerScript is supposed to support documents with "child" ToC inside some sections, so that from child ToC you can toggle up to master ToC and down to the text. My http://www.michaelpundit.com/tech/LoggingDebugger logging debugger UI article has such nested ToC, although I have not yet TiggerScript'ed it.