This fixes a cross-site scripting vulnerability.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
loading_set_progress(50);
document.onkeydown = hotkey_handler;
- setTimeout("hotkey_prefix_timeout()", 5*1000);
+ setTimeout(hotkey_prefix_timeout, 5*1000);
if (!getActiveFeedId()) {
viewfeed({feed: -3});
Element.hide('cmdline');
}
- setTimeout("hotkey_prefix_timeout()", 1000);
+ setTimeout(hotkey_prefix_timeout, 1000);
} catch (e) {
exception_error("hotkey_prefix_timeout", e);
updateFeedList();
} else {
if (feed_id == getActiveFeedId())
- setTimeout("viewfeed({feed:-5})", 100);
+ setTimeout(function() { viewfeed({feed:-5}) }, 100);
if (feed_id < 0) updateFeedList();
}
if (method == 'editFeed') {
var param = getURLParam('methodparam');
- window.setTimeout('editFeed(' + param + ')', 100);
+ window.setTimeout(function() { editFeed(param) }, 100);
}
- setTimeout("hotkey_prefix_timeout()", 5*1000);
+ setTimeout(hotkey_prefix_timeout, 5*1000);
} catch (e) {
exception_error("init_second_stage", e);
function timeout() {
if (getInitParam("bw_limit") != "1") {
request_counters();
- setTimeout("timeout()", 60*1000);
+ setTimeout(timeout, 60*1000);
}
}
if (getInitParam("simple_update")) {
console.log("scheduling simple feed updater...");
- window.setTimeout("update_random_feed()", 30*1000);
+ window.setTimeout(update_random_feed, 30*1000);
}
} catch (e) {
parameters: "op=rpc&method=updateRandomFeed",
onComplete: function(transport) {
handle_rpc_json(transport, true);
- window.setTimeout("update_random_feed()", 30*1000);
+ window.setTimeout(update_random_feed, 30*1000);
} });
} catch (e) {
function catchupCurrentBatchIfNeeded() {
if (catchup_id_batch.length > 0) {
window.clearTimeout(catchup_timeout_id);
- catchup_timeout_id = window.setTimeout('catchupBatchedArticles()', 1000);
+ catchup_timeout_id = window.setTimeout(catchupBatchedArticles, 1000);
if (catchup_id_batch.length >= 10) {
catchupBatchedArticles();