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

@ -2,8 +2,17 @@
$(function () {
if (window.snowFall && !window.rl.settingsGet('Auth'))
{
window.snowFall.snow(document.getElementsByTagName('body'), {
shadow: true, round: true, minSize: 2, maxSize: 5
});
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'), {
shadow: true, round: true, minSize: 2, maxSize: 5
});
}
}
});