mirror of
https://github.com/miniflux/v2.git
synced 2025-08-21 18:11:09 +00:00
feat(js): load app.js
using JavaScript module
- The JS bundle has its own isolated scope - There is no need to use IIFEs anymore (Immediately Invoked Function Expressions) - Modules are executed after the HTML document is fully parsed, similar to `defer` attribute - There is no need to use `DOMContentLoaded` anymore - Module scripts inherently run in strict mode (no need to define `use strict` anymore)
This commit is contained in:
parent
50197c2be3
commit
bfbc1c88c3
4 changed files with 172 additions and 187 deletions
|
@ -489,6 +489,9 @@ function appendIconLabel(element, labelTextContent) {
|
|||
function toggleEntryStatus(element, toasting) {
|
||||
const entryID = parseInt(element.dataset.id, 10);
|
||||
const link = element.querySelector(":is(a, button)[data-toggle-status]");
|
||||
if (!link) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentStatus = link.dataset.value;
|
||||
const newStatus = currentStatus === "read" ? "unread" : "read";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue