Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js if mobile browser

// credit to Timothy Huang for this regex test: 
// https://dev.to/timhuang/a-simple-way-to-detect-if-browser-is-on-a-mobile-device-with-javascript-44j3
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
  return true
}
else{
  return false
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript play many background music 
Javascript :: george will turn g years old in year k 
Javascript :: auto increment string in javascript 
Javascript :: cara-membuat-post-vi…ounter-di.html:1440 get https://bloggertut.googlecode.com/svn/trunk/js/highlight.pack.js net::err_aborted 404 
Javascript :: what is steal.js 
Javascript :: iron_to_nugget.json 
Javascript :: [ERROR -]<ng-select {{items}}="cities" 
Javascript :: langenderferc@gmail.com 
Javascript :: complex type in javascript and memory allocation 
Javascript :: data in table when i click the table link in open table in another jquery 
Javascript :: gatsby browsersync 
Javascript :: how to turn a page upside down in javascript 
Javascript :: show data of mongoose in html page using ejs 
Javascript :: show ... in 2nd line javascript 
Javascript :: what was the reaction of others bostonh tea party 
Javascript :: cortar elemento y pegar en otro lugar jquery 
Javascript :: deploy angular app on google app engine 
Javascript :: store current date in chrome storage extension 
Javascript :: event listener function called parameters 
Javascript :: processing an express form with node-postgres 
Javascript :: demo.pesapal.com api keys stackoverflow 
Javascript :: handling event changes 
Javascript :: get foco a div 
Javascript :: most common use cases of portals in react 
Javascript :: JS glob to regex 
Javascript :: 5.625/2 
Javascript :: how to set input of time type to current time on initialization 
Javascript :: mat slider in a reactve form 
Javascript :: mdn golang 
Javascript :: getElementbyhref 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =