summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-03-08 18:33:42 +0300
committerAndrew Dolgov <[email protected]>2018-03-08 18:33:42 +0300
commit3009ecc44f4a2cebe0d918f6a993ce0cab0fbe81 (patch)
tree1ba72d41dfb8870a7635629790813e349151d800 /js
parentc9a5e5aa2875008931f4f75ba7d01fd5439cd0ea (diff)
initial for JS strict mode
Diffstat (limited to 'js')
-rw-r--r--js/PluginHost.js2
-rw-r--r--js/feedlist.js2
-rwxr-xr-xjs/functions.js2
-rwxr-xr-xjs/prefs.js2
-rw-r--r--js/tt-rss.js10
-rwxr-xr-xjs/viewfeed.js2
6 files changed, 10 insertions, 10 deletions
diff --git a/js/PluginHost.js b/js/PluginHost.js
index ae89ba481..88e2660ed 100644
--- a/js/PluginHost.js
+++ b/js/PluginHost.js
@@ -22,7 +22,7 @@ var PluginHost = {
console.warn('PluginHost::run ' + name);
if (typeof(this.hooks[name]) != 'undefined')
- for (i = 0; i < this.hooks[name].length; i++)
+ for (var i = 0; i < this.hooks[name].length; i++)
if (!this.hooks[name][i](args)) break;
}
};
diff --git a/js/feedlist.js b/js/feedlist.js
index 1e783f3b3..028c8737d 100644
--- a/js/feedlist.js
+++ b/js/feedlist.js
@@ -164,7 +164,7 @@ function viewfeed(params) {
window.open("backend.php" + query + "&debug=1&csrf_token=" + getInitParam("csrf_token"));
}
- timeout_ms = can_wait ? 250 : 0;
+ var timeout_ms = can_wait ? 250 : 0;
_viewfeed_timeout = setTimeout(function() {
new Ajax.Request("backend.php", {
diff --git a/js/functions.js b/js/functions.js
index 9ae205cb3..46b9958ea 100755
--- a/js/functions.js
+++ b/js/functions.js
@@ -1117,7 +1117,7 @@ function backend_sanity_check_callback(transport) {
if (params) {
console.log('reading init-params...');
- for (k in params) {
+ for (var k in params) {
console.log("IP: " + k + " => " + JSON.stringify(params[k]));
if (k == "label_base_index") _label_base_index = parseInt(params[k]);
}
diff --git a/js/prefs.js b/js/prefs.js
index a3f32dcbc..aa06674df 100755
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -939,7 +939,7 @@ function pref_hotkey_handler(e) {
var hotkey_action = false;
var hotkeys = getInitParam("hotkeys");
- for (sequence in hotkeys[1]) {
+ for (var sequence in hotkeys[1]) {
if (sequence == hotkey) {
hotkey_action = hotkeys[1][sequence];
break;
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 4df1b04ee..d5d31cfed 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -628,7 +628,7 @@ function init_second_stage() {
var hotkeys = getInitParam("hotkeys");
var tmp = [];
- for (sequence in hotkeys[1]) {
+ for (var sequence in hotkeys[1]) {
filtered = sequence.replace(/\|.*$/, "");
tmp[filtered] = hotkeys[1][sequence];
}
@@ -752,7 +752,7 @@ function parse_runtime_info(data) {
//console.log("parsing runtime info...");
- for (k in data) {
+ for (var k in data) {
var v = data[k];
// console.log("RI: " + k + " => " + v);
@@ -899,7 +899,7 @@ function hotkey_handler(e) {
var hotkey_action = false;
var hotkeys = getInitParam("hotkeys");
- for (sequence in hotkeys[1]) {
+ for (var sequence in hotkeys[1]) {
if (sequence == hotkey) {
hotkey_action = hotkeys[1][sequence];
break;
@@ -1076,11 +1076,11 @@ function update_random_feed() {
}
function hash_get(key) {
- kv = window.location.hash.substring(1).toQueryParams();
+ var kv = window.location.hash.substring(1).toQueryParams();
return kv[key];
}
function hash_set(key, value) {
- kv = window.location.hash.substring(1).toQueryParams();
+ var kv = window.location.hash.substring(1).toQueryParams();
kv[key] = value;
window.location.hash = $H(kv).toQueryString();
}
diff --git a/js/viewfeed.js b/js/viewfeed.js
index ffd8fcf46..925d71379 100755
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -470,7 +470,7 @@ function togglePub(id, client_only, no_effects, note) {
imgs.push(fte[i]);
}
- for (i = 0; i < imgs.length; i++) {
+ for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
if (!row.hasClassName("published") || note != undefined) {