mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
refactor(js): add jshint check for strict comparison
This commit is contained in:
parent
605eeb4525
commit
91f9a7650e
5 changed files with 12 additions and 11 deletions
|
@ -151,7 +151,7 @@ function handleEntryStatus(item, element, setToRead) {
|
|||
const toasting = !element;
|
||||
const currentEntry = findEntry(element);
|
||||
if (currentEntry) {
|
||||
if (!setToRead || currentEntry.querySelector(":is(a, button)[data-toggle-status]").dataset.value == "unread") {
|
||||
if (!setToRead || currentEntry.querySelector(":is(a, button)[data-toggle-status]").dataset.value === "unread") {
|
||||
toggleEntryStatus(currentEntry, toasting);
|
||||
}
|
||||
if (isListView() && currentEntry.classList.contains('current-item')) {
|
||||
|
@ -380,7 +380,7 @@ function openOriginalLink(openLinkInCurrentTab) {
|
|||
|
||||
const currentItem = document.querySelector(".current-item");
|
||||
// If we are not on the list of starred items, move to the next item
|
||||
if (document.location.href != document.querySelector(':is(a, button)[data-page=starred]').href) {
|
||||
if (document.location.href !== document.querySelector(':is(a, button)[data-page=starred]').href) {
|
||||
goToListItem(1);
|
||||
}
|
||||
markEntryAsRead(currentItem);
|
||||
|
@ -522,9 +522,9 @@ function goToListItem(offset) {
|
|||
// By default adjust selection by offset
|
||||
let itemOffset = (i + offset + items.length) % items.length;
|
||||
// Allow jumping to top or bottom
|
||||
if (offset == TOP) {
|
||||
if (offset === TOP) {
|
||||
itemOffset = 0;
|
||||
} else if (offset == BOTTOM) {
|
||||
} else if (offset === BOTTOM) {
|
||||
itemOffset = items.length - 1;
|
||||
}
|
||||
const item = items[itemOffset];
|
||||
|
@ -595,7 +595,7 @@ function findEntry(element) {
|
|||
}
|
||||
|
||||
function handleConfirmationMessage(linkElement, callback) {
|
||||
if (linkElement.tagName != 'A' && linkElement.tagName != "BUTTON") {
|
||||
if (linkElement.tagName !== 'A' && linkElement.tagName !== "BUTTON") {
|
||||
linkElement = linkElement.parentNode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue