declare globals with let

This commit is contained in:
Andrew Dolgov 2018-11-29 20:09:25 +03:00
parent 424e28db6b
commit 8572e0108a
4 changed files with 33 additions and 33 deletions

View File

@ -1,12 +1,12 @@
var _infscroll_disable = 0;
var _infscroll_request_sent = 0;
let _infscroll_disable = 0;
let _infscroll_request_sent = 0;
var _search_query = false;
var _viewfeed_last = 0;
var _viewfeed_timeout = false;
let _search_query = false;
let _viewfeed_last = 0;
let _viewfeed_timeout = false;
var counters_last_request = 0;
var _counters_prev = [];
let counters_last_request = 0;
let _counters_prev = [];
function resetCounterCache() {
_counters_prev = [];

View File

@ -1,9 +1,9 @@
var init_params = new Array();
let init_params = new Array();
var hotkey_prefix = false;
var hotkey_prefix_pressed = false;
let hotkey_prefix = false;
let hotkey_prefix_pressed = false;
var seq = "";
let seq = "";
function notify_callback2(transport, sticky) {
notify_info(transport.responseText, sticky);

View File

@ -1,11 +1,11 @@
var global_unread = -1;
var hotkey_prefix = false;
var hotkey_prefix_pressed = false;
var hotkey_actions = {};
var _widescreen_mode = false;
var _rpc_seq = 0;
var _active_feed_id = 0;
var _active_feed_is_cat = false;
let global_unread = -1;
let hotkey_prefix = false;
let hotkey_prefix_pressed = false;
let hotkey_actions = {};
let _widescreen_mode = false;
let _rpc_seq = 0;
let _active_feed_id = 0;
let _active_feed_is_cat = false;
function next_seq() {
_rpc_seq += 1;

View File

@ -1,23 +1,23 @@
var _active_article_id = 0;
let _active_article_id = 0;
var vgroup_last_feed = false;
var post_under_pointer = false;
let vgroup_last_feed = false;
let post_under_pointer = false;
var last_requested_article = false;
let last_requested_article = false;
var catchup_id_batch = [];
var catchup_timeout_id = false;
let catchup_id_batch = [];
let catchup_timeout_id = false;
var cids_requested = [];
var loaded_article_ids = [];
var _last_headlines_update = 0;
var _headlines_scroll_offset = 0;
var current_first_id = 0;
var last_search_query;
let cids_requested = [];
let loaded_article_ids = [];
let _last_headlines_update = 0;
let _headlines_scroll_offset = 0;
let current_first_id = 0;
let last_search_query;
var _catchup_request_sent = false;
let _catchup_request_sent = false;
var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
let has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
function headlines_callback2(transport, offset, background, infscroll_req) {
handle_rpc_json(transport);