Disable snow animation for mobile devices

This commit is contained in:
RainLoop Team 2013-12-30 01:24:30 +04:00
parent 17b2afcf22
commit 7e0a1500a6
2 changed files with 13 additions and 4 deletions

View file

@ -1 +1 @@
1.0 1.1

View file

@ -1,9 +1,18 @@
$(function () { $(function () {
if (window.snowFall && !window.rl.settingsGet('Auth')) if (window.snowFall && !window.rl.settingsGet('Auth'))
{
var
sUserAgent = (navigator.userAgent || '').toLowerCase(),
bIsiOSDevice = -1 < sUserAgent.indexOf('iphone') || -1 < sUserAgent.indexOf('ipod') || -1 < sUserAgent.indexOf('ipad'),
bIsAndroidDevice = -1 < sUserAgent.indexOf('android')
;
if (!bIsiOSDevice && !bIsAndroidDevice)
{ {
window.snowFall.snow(document.getElementsByTagName('body'), { window.snowFall.snow(document.getElementsByTagName('body'), {
shadow: true, round: true, minSize: 2, maxSize: 5 shadow: true, round: true, minSize: 2, maxSize: 5
}); });
} }
}
}); });