app/assets/javascripts/pagelet_rails.js in pagelet_rails-0.1.6 vs app/assets/javascripts/pagelet_rails.js in pagelet_rails-0.1.7

- old
+ new

@@ -36,11 +36,11 @@ data.elem.html(html) }); }; root.loadThroughBatchProxy = function(urls) { - if (urls.length == 0) { return; } + if (urls.length === 0) { return; } var prev_index = 0; $.ajax({ url: '/pagelet_proxy', @@ -57,21 +57,21 @@ var end_index = -1; do { end_index = text.indexOf("\n\n//\n\n", prev_index); - if (end_index != -1) { + if (end_index !== -1) { var new_text = text.substring(prev_index, end_index); eval(new_text); prev_index = end_index + 1; // console.log('found'); // console.log(new_text); } - } while (end_index != -1); + } while (end_index !== -1); } }); }; root.loadPagelets = function(selector) { @@ -100,11 +100,11 @@ for (var group_name in groups) { if (groups.hasOwnProperty(group_name)) { var group = groups[group_name]; - if (group.length == 1) { + if (group.length === 1) { root.loadDirectly(group[0]); } else { var urls = group.map(function(e) { return e.url; }); root.loadThroughBatchProxy(urls); } @@ -177,9 +177,5 @@ }); } initialise(); })(window); - - - -