UserFunctions

provides functions similar to Mw:Extension:UserFunctions. See for more details.
ATTENTION: The script may not work on mobile skin.
== ==
== ==
Using HTML class attribute user-functions or UserFunctions to call the functions, any <tag> is okay.
=== if-logged-in ===
[content]
* "true": The content will be displayed when the viewer is logged in.
* "false": The content will be displayed when the viewer is not logged in.
; demo
you are logged inyou are NOT logged in
=== username ===
<!-- basic -->
[content]
<!-- with-link -->
[link text]
The content will be replaced by viewer's user name.
; demo
* User name: 
* With link: 
* Link with text: Link text here!
=== if-username ===
[content]
The content will be displayed when the viewer's user name matches the settings.
;demo
You areare NOT 机智的小鱼君~
=== if-usergroup ===
[content]
The content will be displayed when the viewer's user groups matches the settings.
; demo
You areare NOT in the "sysop" group!
== Data typings ==
=== boolean ===
* false: false no 0 will give false
* true: any other value will give true
; examples
<!-- true -->
logged in
logged in
logged in
<!-- false -->
not logged in
not logged in
not logged in
=== string[] (array of strings) ===
* Inputed string will be split by |
* String starts with ! means false
; example
foo|!bar → {foo: true, bar: false}