Commit a05c04681ce685e2eba78e3b98a629538a02fca8
1 parent
80fc6b35
Exists in
master
and in
8 other branches
Fix small issues about jshint
Showing
2 changed files
with
8 additions
and
7 deletions
Show diff stats
src/app/index.constants.js
1 | -/* global Modernizr:false, jQuery:false */ | 1 | +/* global window:true */ |
2 | (function() { | 2 | (function() { |
3 | 'use strict'; | 3 | 'use strict'; |
4 | 4 | ||
@@ -11,8 +11,8 @@ | @@ -11,8 +11,8 @@ | ||
11 | home: 103358 | 11 | home: 103358 |
12 | } | 12 | } |
13 | }) | 13 | }) |
14 | - .constant('Modernizr', Modernizr) | ||
15 | - .constant('jQuery', jQuery) | 14 | + .constant('Modernizr', window.Modernizr) |
15 | + .constant('jQuery', window.jQuery) | ||
16 | // .constant('key', value) | 16 | // .constant('key', value) |
17 | ; | 17 | ; |
18 | 18 |
src/app/partials/inicio/inicio.controller.js
1 | -/* globals document:true */ | 1 | +/* globals document:true, window:true */ |
2 | (function() { | 2 | (function() { |
3 | 'use strict'; | 3 | 'use strict'; |
4 | 4 | ||
@@ -54,8 +54,8 @@ | @@ -54,8 +54,8 @@ | ||
54 | 54 | ||
55 | // inject dependencies | 55 | // inject dependencies |
56 | injectIframeApiJs(); | 56 | injectIframeApiJs(); |
57 | - document.onYouTubeIframeAPIReady = document.onYouTubeIframeAPIReady || onYouTubeIframeAPIReady; | ||
58 | - document.onYouTubePlayerReady = document.onYouTubePlayerReady || onYouTubePlayerReady; | 57 | + window.onYouTubeIframeAPIReady = window.onYouTubeIframeAPIReady || onYouTubeIframeAPIReady; |
58 | + window.onYouTubePlayerReady = window.onYouTubePlayerReady || onYouTubePlayerReady; | ||
59 | }; | 59 | }; |
60 | 60 | ||
61 | InicioController.prototype.handleHomeAbstract = function(abstract) { | 61 | InicioController.prototype.handleHomeAbstract = function(abstract) { |
@@ -77,7 +77,8 @@ | @@ -77,7 +77,8 @@ | ||
77 | 77 | ||
78 | function onYouTubeIframeAPIReady() { | 78 | function onYouTubeIframeAPIReady() { |
79 | var ytIframe = angular.element.find('.js-iframe iframe'); | 79 | var ytIframe = angular.element.find('.js-iframe iframe'); |
80 | - new document.YT.Player(ytIframe[0], { | 80 | + var YTPlayer = window.YT.Player; |
81 | + new YTPlayer(ytIframe[0], { | ||
81 | events: { | 82 | events: { |
82 | 'onReady': onYouTubePlayerReady | 83 | 'onReady': onYouTubePlayerReady |
83 | } | 84 | } |