MobileFrontend
Mobile optimised frontend for MediaWiki
|
Implements IMobileTransform, that splits the body of the document into sections demarcated by the $headings elements. More...
Public Member Functions | |
__construct (array $topHeadingTags, bool $scriptsEnabled) | |
apply (DOMElement $doc) | |
Performs html transformation that splits the body of the document into sections demarcated by the $headings elements. | |
Static Public Member Functions | |
static | interimTogglingSupport ( $nonce) |
Make it possible to open sections while JavaScript is still loading. | |
Public Attributes | |
const | STYLE_COLLAPSIBLE_SECTION_CLASS = 'collapsible-block' |
Class name for collapsible section wrappers. | |
Implements IMobileTransform, that splits the body of the document into sections demarcated by the $headings elements.
Also moves the first paragraph in the lead section above the infobox.
All member elements of the sections are added to a
MobileFrontend\Transforms\MakeSectionsTransform::__construct | ( | array | $topHeadingTags, |
bool | $scriptsEnabled ) |
array | $topHeadingTags | list of tags could ne cosidered as sections |
bool | $scriptsEnabled | wheather scripts are enabled |
MobileFrontend\Transforms\MakeSectionsTransform::apply | ( | DOMElement | $doc | ) |
Performs html transformation that splits the body of the document into sections demarcated by the $headings elements.
Also moves the first paragraph in the lead section above the infobox.
DOMElement | $doc | html document |
Implements MobileFrontend\Transforms\IMobileTransform.
|
static |
Make it possible to open sections while JavaScript is still loading.
string | null | $nonce | CSP nonce or null if feature is disabled |