From 43c3228256b44e3464add1c39c2463672af9d102 Mon Sep 17 00:00:00 2001 From: Ravavyr Date: Tue, 17 Dec 2019 21:13:42 -0500 Subject: [PATCH] Modified mobile detection for on resize check --- taino.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/taino.js b/taino.js index 9ea71d4..fdb55f6 100644 --- a/taino.js +++ b/taino.js @@ -53,7 +53,7 @@ class taino{ var t =this; if(typeof(resizeTimer)!='undefined'){ clearTimeout(resizeTimer); } resizeTimer = setTimeout(function() { - if(taino.ismobile()){ + if(taino.ismobile() ===false){ t.loadtemplate(); t.update(); } @@ -162,7 +162,7 @@ class taino{ this.currentpage = this.getcurrent(path); this.loadScript(this.jspath+this.currentpage+'.js').then(()=>{ this.loadcontent(); - window.scrollTo(0,0); + window.scrollTo(0,0); }); } @@ -247,9 +247,7 @@ class taino{ static ismobile() { var useragent = navigator.userAgent; - if(useragent.match(/Android/i)|| - useragent.match(/iPhone/i)|| - useragent.match(/iPad/i)) { + if(useragent.match(/Android|iPhone|iPad/i)){ return true; } else { return false;