summaryrefslogtreecommitdiff
path: root/js/App.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-06-04 23:27:22 +0300
committerAndrew Dolgov <[email protected]>2020-06-04 23:27:22 +0300
commit88027d7a3913872c16f42cb9d9d713aa994eb034 (patch)
tree1fe058c07c0e5d532c063bd0e4e7b69a47096ae2 /js/App.js
parent755662a9d756fffa225343da847de2a36f464c7b (diff)
fix various minor issues reported by eslint
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js40
1 files changed, 24 insertions, 16 deletions
diff --git a/js/App.js b/js/App.js
index 54e8f61f3..f75413c86 100644
--- a/js/App.js
+++ b/js/App.js
@@ -1,3 +1,9 @@
+'use strict';
+
+/* global __, ngettext, Article, Headlines, Filters */
+/* global xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Feeds, Cookie */
+/* global CommonDialogs, CommonFilters, Plugins */
+
const App = {
_initParams: [],
_rpc_seq: 0,
@@ -505,12 +511,12 @@ const App = {
stack_msg += `<div><b>Additional information:</b></div>
<textarea name="stack" readonly="1">${params.info}</textarea>`;
- let content = `<div class="error-contents">
+ const content = `<div class="error-contents">
<p class="message">${message}</p>
${stack_msg}
<div class="dlgButtons">
<button dojoType="dijit.form.Button"
- onclick=\"dijit.byId('exceptionDlg').hide()">${__('Close this window')}</button>
+ onclick="dijit.byId('exceptionDlg').hide()">${__('Close this window')}</button>
</div>
</div>`;
@@ -579,7 +585,7 @@ const App = {
let errorMsg = "";
['MutationObserver'].each(function(wf) {
- if (! (wf in window)) {
+ if (!(wf in window)) {
errorMsg = `Browser feature check failed: <code>window.${wf}</code> not found.`;
throw $break;
}
@@ -611,7 +617,7 @@ const App = {
switch (this.urlParam('method')) {
case "editfeed":
- window.setTimeout(function () {
+ window.setTimeout(() => {
CommonDialogs.editFeed(this.urlParam('methodparam'))
}, 100);
break;
@@ -1099,22 +1105,24 @@ const App = {
CommonDialogs.editFeed(Feeds.getActive());
break;
case "qmcRemoveFeed":
- const actid = Feeds.getActive();
+ {
+ const actid = Feeds.getActive();
- if (!actid) {
- alert(__("Please select some feed first."));
- return;
- }
+ if (!actid) {
+ alert(__("Please select some feed first."));
+ return;
+ }
- if (Feeds.activeIsCat()) {
- alert(__("You can't unsubscribe from the category."));
- return;
- }
+ if (Feeds.activeIsCat()) {
+ alert(__("You can't unsubscribe from the category."));
+ return;
+ }
- const fn = Feeds.getName(actid);
+ const fn = Feeds.getName(actid);
- if (confirm(__("Unsubscribe from %s?").replace("%s", fn))) {
- CommonDialogs.unsubscribeFeed(actid);
+ if (confirm(__("Unsubscribe from %s?").replace("%s", fn))) {
+ CommonDialogs.unsubscribeFeed(actid);
+ }
}
break;
case "qmcCatchupAll":