Last modified: 2011-03-13 18:06:18 UTC
There are no JS variables to tell us whether we are viewing or previewing. It
would be handy to know if we're previewing so that JS that folds sections
doesn't activate when previewing edits to that section.
A more general solutions might provide all the URL/GET parameters such as
"action", "section" etc.
See also bug 8421.
One of the variables is wgAction. For article viewing it says "view." For previewing it says "submit." Can this be closed?
But they don't tell you whether you're previewing the entire article or just a section.
Adding "&section=x" to the 'action' field of the edit form when editing a section would work nicely, since it would carry over the "§ion=" in the URL.
Check wpSection hidden input field, no need for yet another JS variable.
wpSection sounds good to me. Closing as WONTFIX.