support for interwikis in experimental JS preview
authorMatmaRex <matma.rex@gmail.com>
Thu, 9 Aug 2012 12:27:46 +0000 (14:27 +0200)
committerMatmaRex <matma.rex@gmail.com>
Thu, 9 Aug 2012 20:13:19 +0000 (22:13 +0200)
commit98dcc7117af5ce1a86e8c8d6e2cedba3749172cc
tree22b9ebeca6991d956c963e6b178f1007e600cb3c
parent02762b56fe72eeed4d63e46a4e14affc4c6ba3bb
support for interwikis in experimental JS preview

Add support for previewing interwikis in "experimental" JavaScript live
preview.

The #p-lang container is not shown when action=edit by default; it is,
however, shown when action=submit. We check for its existence and if
missing, we add it after #p-tb. (As print/export links are not shown
during either editing or previewing.)

If #p-tb is missing (as the case is in some skins), nothing happens
(and interwikis stay unpreviewable). jQuery is very permissive
and keeps chugging along at all costs.

If #p-lang is missing in the preview page, nothing bad happens as well.
The content of #p-lang is properly cleared and not filled with anything.
(See above comment about jQuery being permissive.)

Change-Id: Idda2e6f7514ba8b1021c719a08855ee9601fa90e
skins/common/preview.js