Skip to content

Commit

Permalink
Added android and iphone check to disable resize event
Browse files Browse the repository at this point in the history
  • Loading branch information
ravstamper committed Dec 18, 2019
1 parent acd22d8 commit ad99a91
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions taino.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ class taino{
var t =this;
if(typeof(resizeTimer)!='undefined'){ clearTimeout(resizeTimer); }
resizeTimer = setTimeout(function() {
t.loadtemplate();
t.update();
if(taino.ismobile()){
t.loadtemplate();
t.update();
}
},250);
});
}
Expand Down Expand Up @@ -242,6 +244,17 @@ class taino{
oldmeta.remove();
}
}

static ismobile() {
var useragent = navigator.userAgent;
if(useragent.match(/Android/i)||
useragent.match(/iPhone/i)||
useragent.match(/iPad/i)) {
return true;
} else {
return false;
}
}
};

/*define routes*/
Expand Down

0 comments on commit ad99a91

Please sign in to comment.