summaryrefslogtreecommitdiff
path: root/js/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-01 21:01:53 +0300
committerAndrew Dolgov <[email protected]>2018-12-01 21:01:53 +0300
commit642c37ea6117954fc19e2a800f2fce4c1304d89d (patch)
treebfe5e86b69f74345f900bcdeff2acb72c36b192c /js/tt-rss.js
parent4bed9be57d671324921bfd1d90d25b8cd0af3d4f (diff)
further effocts to wrap JS stuff into objects
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r--js/tt-rss.js46
1 files changed, 23 insertions, 23 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 4c37102e6..02cf1ddb6 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -143,7 +143,7 @@ const App = {
if (getInitParam("simple_update")) {
console.log("scheduling simple feed updater...");
- window.setInterval(Feeds.updateRandomFeed, 30 * 1000);
+ window.setInterval(() => { Feeds.updateRandomFeed() }, 30 * 1000);
}
console.log("second stage ok");
@@ -191,7 +191,7 @@ const App = {
switchPanelMode: function(wide) {
if (App.isCombinedMode()) return;
- const article_id = getActiveArticleId();
+ const article_id = Article.getActiveArticleId();
if (wide) {
dijit.byId("headlines-wrap-inner").attr("design", 'sidebar');
@@ -249,44 +249,44 @@ function init_hotkey_actions() {
if (rv) Feeds.viewfeed({feed: rv[0], is_cat: rv[1], delayed: true})
};
hotkey_actions["next_article"] = function () {
- moveToPost('next');
+ Headlines.moveToPost('next');
};
hotkey_actions["prev_article"] = function () {
- moveToPost('prev');
+ Headlines.moveToPost('prev');
};
hotkey_actions["next_article_noscroll"] = function () {
- moveToPost('next', true);
+ Headlines.moveToPost('next', true);
};
hotkey_actions["prev_article_noscroll"] = function () {
- moveToPost('prev', true);
+ Headlines.moveToPost('prev', true);
};
hotkey_actions["next_article_noexpand"] = function () {
- moveToPost('next', true, true);
+ Headlines.moveToPost('next', true, true);
};
hotkey_actions["prev_article_noexpand"] = function () {
- moveToPost('prev', true, true);
+ Headlines.moveToPost('prev', true, true);
};
hotkey_actions["search_dialog"] = function () {
Feeds.search();
};
hotkey_actions["toggle_mark"] = function () {
- selectionToggleMarked();
+ Headlines.selectionToggleMarked();
};
hotkey_actions["toggle_publ"] = function () {
- selectionTogglePublished();
+ Headlines.selectionTogglePublished();
};
hotkey_actions["toggle_unread"] = function () {
- selectionToggleUnread({no_error: 1});
+ Headlines.selectionToggleUnread({no_error: 1});
};
hotkey_actions["edit_tags"] = function () {
- const id = getActiveArticleId();
+ const id = Article.getActiveArticleId();
if (id) {
- editArticleTags(id);
+ Article.editArticleTags(id);
}
}
hotkey_actions["open_in_new_window"] = function () {
- if (getActiveArticleId()) {
- Article.openArticleInNewWindow(getActiveArticleId());
+ if (Article.getActiveArticleId()) {
+ Article.openArticleInNewWindow(Article.getActiveArticleId());
}
};
hotkey_actions["catchup_below"] = function () {
@@ -318,22 +318,22 @@ function init_hotkey_actions() {
}
};
hotkey_actions["select_all"] = function () {
- selectArticles('all');
+ Headlines.selectArticles('all');
};
hotkey_actions["select_unread"] = function () {
- selectArticles('unread');
+ Headlines.selectArticles('unread');
};
hotkey_actions["select_marked"] = function () {
- selectArticles('marked');
+ Headlines.selectArticles('marked');
};
hotkey_actions["select_published"] = function () {
- selectArticles('published');
+ Headlines.selectArticles('published');
};
hotkey_actions["select_invert"] = function () {
- selectArticles('invert');
+ Headlines.selectArticles('invert');
};
hotkey_actions["select_none"] = function () {
- selectArticles('none');
+ Headlines.selectArticles('none');
};
hotkey_actions["feed_refresh"] = function () {
if (Feeds.getActiveFeedId() != undefined) {
@@ -434,8 +434,8 @@ function init_hotkey_actions() {
};
hotkey_actions["toggle_embed_original"] = function () {
if (typeof embedOriginalArticle != "undefined") {
- if (getActiveArticleId())
- embedOriginalArticle(getActiveArticleId());
+ if (Article.getActiveArticleId())
+ embedOriginalArticle(Article.getActiveArticleId());
} else {
alert(__("Please enable embed_original plugin first."));
}