imported>Oetterer K (Schützte „Modul:Util“: Automatic protection of selected project pages ([Bearbeiten=Nur Administratoren erlauben] (unbeschränkt) [Verschieben=Nur Administratoren erlauben] (unbeschränkt))) |
K (Schützte „Modul:Util“: Automatic protection of selected project pages ([Bearbeiten=Nur Administratoren erlauben] (unbeschränkt) [Verschieben=Nur Administratoren erlauben] (unbeschränkt))) |
(kein Unterschied)
|
Aktuelle Version vom 6. April 2023, 19:20 Uhr
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This module implements various general utility functions to be used via #invoke
.
Usage[Quelltext bearbeiten]
{{#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()
-- dont shorten this to return mw and mw.bootstrap and mw.bootstrap.getSkin() or 'unknown'
-- or dependant templates will show missing module bootstrap when BSC is not loaded
if mw and mw.bootstrap then
return mw.bootstrap.getSkin()
else
return 'unknown'
end
end
return p