Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function() {
- if( navigator.userAgent.match(/Android/i)
- || navigator.userAgent.match(/webOS/i)
- || navigator.userAgent.match(/iPhone/i)
- || navigator.userAgent.match(/iPad/i)
- || navigator.userAgent.match(/iPod/i)
- || navigator.userAgent.match(/BlackBerry/i)
- || navigator.userAgent.match(/Windows Phone/i)
- ){
- document.write('<input type="hidden" name="device" value="mobile">');
- } else {
- document.write('<input type="hidden" name="device" value="desktop">');
- }
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement