summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/App.js5
-rw-r--r--js/Article.js4
-rwxr-xr-xjs/FeedTree.js6
-rw-r--r--js/Feeds.js8
-rwxr-xr-xjs/Headlines.js6
-rw-r--r--js/PrefFeedTree.js3
-rw-r--r--js/PrefFilterTree.js2
-rwxr-xr-xjs/form/Select.js2
-rw-r--r--js/form/ValidationMultiSelect.js4
-rw-r--r--js/form/ValidationTextArea.js4
-rw-r--r--js/utility.js3
-rw-r--r--plugins/hotkeys_force_top/init.js2
-rw-r--r--plugins/share/share_prefs.js2
-rw-r--r--plugins/toggle_sidebar/init.js2
14 files changed, 29 insertions, 24 deletions
diff --git a/js/App.js b/js/App.js
index 0adf291c2..571e3373f 100644
--- a/js/App.js
+++ b/js/App.js
@@ -196,7 +196,7 @@ const App = {
mql.addEventListener("change", () => {
this.nightModeChanged(mql.matches, App.byId("theme_auto_css"));
});
- } catch (e) {
+ } catch {
console.warn("exception while trying to set MQL event listener");
}
@@ -276,7 +276,7 @@ const App = {
try {
const results = new RegExp('[?&]' + name + '=([^&#]*)').exec(window.location.href);
return decodeURIComponent(results[1].replace(/\+/g, " ")) || 0;
- } catch (e) {
+ } catch {
return 0;
}
},
@@ -701,6 +701,7 @@ const App = {
this.is_prefs = is_prefs;
window.onerror = this.Error.onWindowError;
+ /* global __default_dark_theme, __default_light_theme */
this.setInitParam("csrf_token", __csrf_token);
this.setInitParam("default_light_theme", __default_light_theme);
this.setInitParam("default_dark_theme", __default_dark_theme);
diff --git a/js/Article.js b/js/Article.js
index f7672033c..88c1cb0e0 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -220,7 +220,7 @@ const Article = {
try {
c.domNode.scrollTop = 0;
- } catch (e) {
+ } catch {
}
c.attr('content', article);
@@ -230,7 +230,7 @@ const Article = {
try {
c.focus();
- } catch (e) {
+ } catch {
}
},
formatComments: function(hl) {
diff --git a/js/FeedTree.js b/js/FeedTree.js
index f0041640d..970efe335 100755
--- a/js/FeedTree.js
+++ b/js/FeedTree.js
@@ -209,10 +209,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
getIconClass: function (item, opened) {
return (!item || this.model.mayHaveChildren(item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "feed-icon";
},
- getLabelClass: function (item/* , opened */) {
+ getLabelClass: function (item /*, opened */) {
return (item.unread <= 0) ? "dijitTreeLabel" : "dijitTreeLabel Unread";
},
- getRowClass: function (item/*, opened */) {
+ getRowClass: function (item /*, opened */) {
let rc = "dijitTreeRow dijitTreeRowFlex";
const is_cat = String(item.id).indexOf('CAT:') !== -1;
@@ -490,7 +490,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
_itemsByIdentity["FEED:" + feed])[0].
getParent().item.bare_id[0];
- } catch (e) {
+ } catch {
return false;
}
},
diff --git a/js/Feeds.js b/js/Feeds.js
index bfe901737..f99d86943 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -544,7 +544,7 @@ const Feeds = {
if (tree && tree.model)
return tree.model.getFeedUnread(feed, is_cat);
- } catch (e) {
+ } catch {
//
}
@@ -557,7 +557,7 @@ const Feeds = {
if (tree && tree.model)
return tree.getFeedCategory(feed);
- } catch (e) {
+ } catch {
//
}
@@ -584,7 +584,7 @@ const Feeds = {
if (tree && tree.model)
return tree.model.setFeedValue(feed, is_cat, key, value);
- } catch (e) {
+ } catch {
//
}
},
@@ -595,7 +595,7 @@ const Feeds = {
if (tree && tree.model)
return tree.model.getFeedValue(feed, is_cat, key);
- } catch (e) {
+ } catch {
//
}
return '';
diff --git a/js/Headlines.js b/js/Headlines.js
index 1725998bc..c27b214dc 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -16,7 +16,7 @@ const Headlines = {
default_move_on_expand: true,
line_scroll_offset: 120, /* px */
sticky_header_observer: new IntersectionObserver(
- (entries, observer) => {
+ (entries) => {
entries.forEach((entry) => {
const header = entry.target.closest('.cdm').querySelector(".header");
@@ -32,7 +32,7 @@ const Headlines = {
{threshold: [0, 1], root: document.querySelector("#headlines-frame")}
),
sticky_content_observer: new IntersectionObserver(
- (entries, observer) => {
+ (entries) => {
entries.forEach((entry) => {
const header = entry.target.closest('.cdm').querySelector(".header");
@@ -44,7 +44,7 @@ const Headlines = {
{threshold: [0, 1], root: document.querySelector("#headlines-frame")}
),
unpack_observer: new IntersectionObserver(
- (entries, observer) => {
+ (entries) => {
entries.forEach((entry) => {
if (entry.intersectionRatio > 0)
Article.unpack(entry.target);
diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js
index 142060488..4e9cb58a5 100644
--- a/js/PrefFeedTree.js
+++ b/js/PrefFeedTree.js
@@ -132,8 +132,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_b
this.inherited(arguments);
this.tree.model.store.save();
},
- // eslint-disable-next-line no-unused-vars
- getRowClass: function (item, opened) {
+ getRowClass: function (item /*, opened */) {
let rc = (!item.error || item.error === '') ? "dijitTreeRow" :
"dijitTreeRow Error";
diff --git a/js/PrefFilterTree.js b/js/PrefFilterTree.js
index 1f20da581..4b077259a 100644
--- a/js/PrefFilterTree.js
+++ b/js/PrefFilterTree.js
@@ -72,7 +72,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
getIconClass: function (item, opened) {
return (!item || this.model.mayHaveChildren(item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "invisible";
},
- getRowClass: function (item, opened) {
+ getRowClass: function (item /*, opened */) {
const enabled = this.model.store.getValue(item, 'enabled');
return enabled ? "dijitTreeRow" : "dijitTreeRow filterDisabled";
diff --git a/js/form/Select.js b/js/form/Select.js
index bc352e612..c44674e2a 100755
--- a/js/form/Select.js
+++ b/js/form/Select.js
@@ -24,7 +24,7 @@ define(["dojo/_base/declare",
onItemClick: function(/*item, menu*/) {
//
},
- _setValueAttr: function(/*anything*/ newValue, /*Boolean?*/ priorityChange){
+ _setValueAttr: function(/*anything*/ newValue, /*Boolean? priorityChange */){
if (this.attr('data-prevent-value-change') === 'true' && newValue !== '')
return;
diff --git a/js/form/ValidationMultiSelect.js b/js/form/ValidationMultiSelect.js
index a0199c9c6..5a7918271 100644
--- a/js/form/ValidationMultiSelect.js
+++ b/js/form/ValidationMultiSelect.js
@@ -6,11 +6,11 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/MultiSelect", ],
function(declare, lang, MultiSelect) {
return declare('fox.form.ValidationMultiSelect', [MultiSelect], {
- constructor: function(params){
+ constructor: function(/* params */) {
this.constraints = {};
this.baseClass += ' dijitValidationMultiSelect';
},
- validate: function(/*Boolean*/ isFocused){
+ validate: function(/*Boolean isFocused */) {
if (this.required && this.attr('value').length === 0)
return false;
diff --git a/js/form/ValidationTextArea.js b/js/form/ValidationTextArea.js
index ced4f8fe7..a71a490c1 100644
--- a/js/form/ValidationTextArea.js
+++ b/js/form/ValidationTextArea.js
@@ -5,7 +5,7 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/SimpleTextarea", "d
function(declare, lang, SimpleTextarea, ValidationTextBox) {
return declare('fox.form.ValidationTextArea', [SimpleTextarea, ValidationTextBox], {
- constructor: function(params){
+ constructor: function(/* params */) {
this.constraints = {};
this.baseClass += ' dijitValidationTextArea';
},
@@ -19,7 +19,7 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dijit/form/SimpleTextarea", "d
if (this.validregexp) {
try {
new RegExp("/" + value + "/");
- } catch (e) {
+ } catch {
return false;
}
}
diff --git a/js/utility.js b/js/utility.js
index e5de5f300..0a9b59454 100644
--- a/js/utility.js
+++ b/js/utility.js
@@ -7,6 +7,7 @@ window.addEventListener("load", function() {
apply_night_mode: function (is_night, link) {
console.log("night mode changed to", is_night);
+ /* global __default_dark_theme, __default_light_theme */
const light_theme = typeof __default_light_theme !== 'undefined' ? __default_light_theme : 'themes/light.css';
const dark_theme = typeof __default_dark_theme !== 'undefined' ? __default_dark_theme : 'themes/night.css';
@@ -35,7 +36,7 @@ window.addEventListener("load", function() {
mql.addEventListener("change", () => {
UtilityJS.apply_night_mode(mql.matches, link);
});
- } catch (e) {
+ } catch {
console.warn("exception while trying to set MQL event listener");
}
diff --git a/plugins/hotkeys_force_top/init.js b/plugins/hotkeys_force_top/init.js
index 8d6280fc9..242d14ecf 100644
--- a/plugins/hotkeys_force_top/init.js
+++ b/plugins/hotkeys_force_top/init.js
@@ -1,3 +1,5 @@
+/* global Headlines, require */
+
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
ready(function () {
Headlines.default_force_to_top = true;
diff --git a/plugins/share/share_prefs.js b/plugins/share/share_prefs.js
index d974af618..e2151065f 100644
--- a/plugins/share/share_prefs.js
+++ b/plugins/share/share_prefs.js
@@ -1,4 +1,4 @@
-/* global Plugins, Notify, xhr, App */
+/* global __, Plugins, Notify, xhr, App */
Plugins.Share = {
clearKeys: function() {
diff --git a/plugins/toggle_sidebar/init.js b/plugins/toggle_sidebar/init.js
index 9efb06193..6ac74d3c3 100644
--- a/plugins/toggle_sidebar/init.js
+++ b/plugins/toggle_sidebar/init.js
@@ -1,3 +1,5 @@
+/* global Plugins, Feeds */
+
Plugins.Toggle_Sidebar = {
toggle: function() {
Feeds.toggle();