Fix all res/ files with ESLint rules with 0 errors.

This commit is contained in:
Gunther Brunner
2016-01-19 23:08:33 +09:00
parent 1006564ae7
commit a3f815c118
258 changed files with 1634 additions and 1634 deletions

View File

@@ -10,12 +10,12 @@ module.exports = function BrowserInfoServiceFactory() {
service[key] = (typeof test == 'function') ? test() : test
}
addTest('touch', function () {
addTest('touch', function() {
return ('ontouchstart' in window) || window.DocumentTouch &&
document instanceof window.DocumentTouch
})
addTest('retina', function () {
addTest('retina', function() {
var mediaQuery = '(-webkit-min-device-pixel-ratio: 1.5), ' +
'(min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), ' +
'(min-resolution: 1.5dppx)'
@@ -25,28 +25,30 @@ module.exports = function BrowserInfoServiceFactory() {
return !!(window.matchMedia && window.matchMedia(mediaQuery).matches)
})
addTest('small', function () {
addTest('small', function() {
var windowWidth = window.screen.width < window.outerWidth ?
window.screen.width : window.outerWidth
return windowWidth < 800
})
addTest('mobile', function () {
addTest('mobile', function() {
return !!(service.small && service.touch)
})
addTest('os', function () {
addTest('os', function() {
var ua = navigator.userAgent
if (ua.match(/Android/i)) {
return 'android'
} else if (ua.match(/iPhone|iPad|iPod/i)) {
}
else if (ua.match(/iPhone|iPad|iPod/i)) {
return 'ios'
} else {
}
else {
return 'pc'
}
})
addTest('webgl', function () {
addTest('webgl', function() {
var canvas = createElement('canvas')
if ('supportsContext' in canvas) {
return canvas.supportsContext('webgl') ||