Skip to content

Instantly share code, notes, and snippets.

View devheedoo's full-sized avatar
☺️
React + TypeScript

heedo devheedoo

☺️
React + TypeScript
  • Growdle
  • Seoul, South Korea
View GitHub Profile
@devheedoo
devheedoo / checkUserMobile.js
Created September 23, 2016 04:41
Check user's agent is mobile or not.
var UserAgent = navigator.userAgent;
if (UserAgent.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || UserAgent.match(/LG|SAMSUNG|Samsung/) != null) {
location.href = "/mobile/index.html";
}