From ad99a912fc8833cb21eddb4917e6c660160b667c Mon Sep 17 00:00:00 2001 From: Ravavyr Date: Tue, 17 Dec 2019 20:54:51 -0500 Subject: [PATCH] Added android and iphone check to disable resize event --- taino.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/taino.js b/taino.js index c0050ce..9ea71d4 100644 --- a/taino.js +++ b/taino.js @@ -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); }); } @@ -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*/