Browse Source

small codestyle fix

pull/8/head
Morozov Andrew 11 years ago
parent
commit
83af69ff26
  1. 7
      src/echo.js

7
src/echo.js

@ -1,7 +1,7 @@
if (!document.querySelectorAll && document.createStyleSheet) { if (!document.querySelectorAll && document.createStyleSheet) {
document.querySelectorAll = function (selector) { document.querySelectorAll = function (selector) {
var all = document.all, result = [], style = document.createStyleSheet(); var all = document.all, result = [], style = document.createStyleSheet();
style.addRule(selector, "fake:fake"); style.addRule(selector, 'fake:fake');
for (var i = all.length - 1; i >= 0; i--) { for (var i = all.length - 1; i >= 0; i--) {
if (all[i].currentStyle.fake === 'fake') { if (all[i].currentStyle.fake === 'fake') {
result.push(all[i]); result.push(all[i]);
@ -18,8 +18,9 @@ window.Echo = (function (window, document, undefined) {
var store; var store;
var _inView = function (img) { var _inView = function (img) {
var coords = img.getBoundingClientRect(); var coords = img.getBoundingClientRect(),
return (coords.top >= 0 && coords.left >= 0 && coords.top) <= (window.innerHeight || document.documentElement.clientHeight); height = window.innerHeight || document.documentElement.clientHeight;
return (coords.top >= 0 && coords.left >= 0 && coords.top) <= height;
}; };
var _pollImages = function () { var _pollImages = function () {

Loading…
Cancel
Save