Browser Detection

Dekomori

blackspigot mommy
Staff
Founder
MC Models
SpigotVIP
Member
Joined
Apr 4, 2021
Messages
2,145
Leaked Spigot Plugins & More
961
Dekomori submitted a new resource:

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

Compatible XF Versions: 2.1 , 2.2
Visible Branding: No

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.

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

Read more about this resource...
 
BlackSpigot General Chat
Rules Help Users
    S @ SexyRapidFish: 1000+ LEAKED STUFF FREE; EVERYTHING CRACKED NO VIRUSSES; flexleaksdotn et
    Top