User agent sniffing
This commit is contained in:
@@ -19,6 +19,7 @@ var yltApp = angular.module('YellowLabTools', [
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
|
yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
|
||||||
|
$rootScope.isTouchDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);
|
||||||
$rootScope.loadedRunId = null;
|
$rootScope.loadedRunId = null;
|
||||||
|
|
||||||
// Google Analytics
|
// Google Analytics
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<p class="price">Free and open source!</p>
|
<p class="price">Free and open source!</p>
|
||||||
|
|
||||||
<form ng-submit="launchTest()" >
|
<form ng-submit="launchTest()" >
|
||||||
<input type="url" name="url" ng-model="url" placeholder="http://www.mysite.com" class="url" />
|
<input type="{{$root.isTouchDevice? 'url' : 'text'}}" name="url" ng-model="url" placeholder="http://www.mysite.com" class="url" />
|
||||||
<input type="submit" value="Launch test" class="launchBtn" ng-class="{disabled: !url}" />
|
<input type="submit" value="Launch test" class="launchBtn" ng-class="{disabled: !url}" />
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
<div class="device">
|
<div class="device">
|
||||||
|
|||||||
Reference in New Issue
Block a user