Modul:Util

This is [[MediaWiki:Tagline]]. Set to <code>display:none</code> by chameleon skin.
Version vom 21. Februar 2018, 09:32 Uhr von imported>Oetterer
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu:Navigation, Suche
Documentation icon Module documentation[view] [edit] [history] [purge]

This module implements various general utility functions to be used via #invoke.

Usage

{{#invoke:Util|getSkin}}
returns name of active skin, if Extension:BootstrapComponents is installed, "unknown" otherwise.

local p = {}

function p.globalFileExtension()
	-- return '.png'
	return '.svg'
end

function p.getSkin()
	return mw and mw.bootstrap and mw.bootstrap.getSkin() or 'unknown'
end

return p