Resource icon

Browser Detection 2.1.0

No permission to download

putr

Well-known member
ELITE
Nov 5, 2020
1,914
63
48
Credits
16,483
putr submitted a new resource:

Browser Detection - A light-weight shim around[Mobile_detect for XenForo

A light-weight shim around Mobile_detect for XenForo 2

Usage (in templates)

The add-on injects the global variable $xf.mobileDetect, check that the variable is set before calling any methods to prevent errors during upgrades or if the add-on is disabled.



HTML:

<xf:if is="$xf.mobileDetect && $xf.mobileDetect.isMobile()">
Is Mobile
<xf:else />
Not Mobile
</xf:if>...

Read more about this resource...