User agent sniffing

This commit is contained in:
Gaël Métais
2015-05-22 10:05:41 +02:00
parent 867680f4e9
commit 49f93e660e
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -19,6 +19,7 @@ var yltApp = angular.module('YellowLabTools', [
]);
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;
// Google Analytics
+1 -1
View File
@@ -2,7 +2,7 @@
<p class="price">Free and open source!</p>
<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}" />
<div class="settings">
<div class="device">