Browse Source

Partially revert "Enable `forin` and `freeze` rules."

This reverts commit df5aa2c722.

Conflicts:
	js/.jshintrc
pull/467/head
XhmikosR 11 years ago
parent
commit
ae71219fad
  1. 1
      js/.jshintrc
  2. 32
      js/push.js

1
js/.jshintrc

@ -4,7 +4,6 @@
"devel" : true, "devel" : true,
"eqeqeq" : true, "eqeqeq" : true,
"expr" : true, "expr" : true,
"forin" : true,
"freeze" : true, "freeze" : true,
"latedef" : true, "latedef" : true,
"nonbsp" : true, "nonbsp" : true,

32
js/push.js

@ -175,13 +175,11 @@
if (transitionFromObj.transition) { if (transitionFromObj.transition) {
activeObj = extendWithDom(activeObj, '.content', activeDom.cloneNode(true)); activeObj = extendWithDom(activeObj, '.content', activeDom.cloneNode(true));
for (key in bars) { for (key in bars) {
if (bars.hasOwnProperty(key)) { barElement = document.querySelector(bars[key]);
barElement = document.querySelector(bars[key]); if (activeObj[key]) {
if (activeObj[key]) { swapContent(activeObj[key], barElement);
swapContent(activeObj[key], barElement); } else if (barElement) {
} else if (barElement) { barElement.parentNode.removeChild(barElement);
barElement.parentNode.removeChild(barElement);
}
} }
} }
} }
@ -208,9 +206,7 @@
options.container = options.container || options.transition ? document.querySelector('.content') : document.body; options.container = options.container || options.transition ? document.querySelector('.content') : document.body;
for (key in bars) { for (key in bars) {
if (bars.hasOwnProperty(key)) { options[key] = options[key] || document.querySelector(bars[key]);
options[key] = options[key] || document.querySelector(bars[key]);
}
} }
if (xhr && xhr.readyState < 4) { if (xhr && xhr.readyState < 4) {
@ -271,13 +267,11 @@
if (options.transition) { if (options.transition) {
for (key in bars) { for (key in bars) {
if (bars.hasOwnProperty(key)) { barElement = document.querySelector(bars[key]);
barElement = document.querySelector(bars[key]); if (data[key]) {
if (data[key]) { swapContent(data[key], barElement);
swapContent(data[key], barElement); } else if (barElement) {
} else if (barElement) { barElement.parentNode.removeChild(barElement);
barElement.parentNode.removeChild(barElement);
}
} }
} }
} }
@ -414,9 +408,7 @@
var result = {}; var result = {};
for (i in obj) { for (i in obj) {
if (obj.hasOwnProperty(i)) { result[i] = obj[i];
result[i] = obj[i];
}
} }
Object.keys(bars).forEach(function (key) { Object.keys(bars).forEach(function (key) {

Loading…
Cancel
Save