mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Adds keyboard shortcut for refreshing all feeds
- Binds the 'R' key to trigger a refresh in the background for all feeds. - Updates the locale, using the same description as the link in the feeds page. Co-authored-by: Vitor Pellegrino <pellegrino@linux.com>
This commit is contained in:
parent
7e5157f218
commit
7fb0bdc9a5
17 changed files with 61 additions and 16 deletions
|
@ -167,11 +167,24 @@ function markEntryAsRead(element) {
|
|||
}
|
||||
}
|
||||
|
||||
// Send the Ajax request to refresh all feeds in the background
|
||||
function handleRefreshAllFeeds() {
|
||||
let url = document.body.dataset.refreshAllFeedsUrl;
|
||||
let request = new RequestBuilder(url);
|
||||
|
||||
request.withCallback(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
request.withHttpMethod("GET");
|
||||
request.execute();
|
||||
}
|
||||
|
||||
// Send the Ajax request to change entries statuses.
|
||||
function updateEntriesStatus(entryIDs, status, callback) {
|
||||
let url = document.body.dataset.entriesStatusUrl;
|
||||
let request = new RequestBuilder(url);
|
||||
request.withBody({ entry_ids: entryIDs, status: status });
|
||||
request.withBody({entry_ids: entryIDs, status: status});
|
||||
request.withCallback(callback);
|
||||
request.execute();
|
||||
|
||||
|
@ -296,7 +309,7 @@ function openOriginalLink(openLinkInCurrentTab) {
|
|||
|
||||
let 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('a[data-page=starred]').href){
|
||||
if (document.location.href != document.querySelector('a[data-page=starred]').href) {
|
||||
goToNextListItem();
|
||||
}
|
||||
markEntryAsRead(currentItem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue