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. 8
      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,

8
js/push.js

@ -175,7 +175,6 @@
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);
@ -184,7 +183,6 @@
} }
} }
} }
}
swapContent( swapContent(
(activeObj.contents || activeDom).cloneNode(true), (activeObj.contents || activeDom).cloneNode(true),
@ -208,10 +206,8 @@
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) {
xhr.onreadystatechange = noop; xhr.onreadystatechange = noop;
@ -271,7 +267,6 @@
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);
@ -280,7 +275,6 @@
} }
} }
} }
}
swapContent(data.contents, options.container, options.transition, function () { swapContent(data.contents, options.container, options.transition, function () {
cacheReplace({ cacheReplace({
@ -414,10 +408,8 @@
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) {
var el = dom.querySelector(bars[key]); var el = dom.querySelector(bars[key]);

Loading…
Cancel
Save