1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add '+' shortcut for new subscription page

This commit is contained in:
Thiago Perrotta 2022-02-27 21:33:53 -05:00 committed by Frédéric Guillot
parent 4831acba39
commit 1e357d3ced
3 changed files with 8 additions and 0 deletions

View file

@ -612,3 +612,8 @@ function showToast(label, iconElement) {
}
}
}
/** Navigate to the new subscription page. */
function goToAddSubscription() {
window.location.href = document.body.dataset.addSubscriptionUrl;
}

View file

@ -32,6 +32,7 @@ document.addEventListener("DOMContentLoaded", function () {
keyboardHandler.on("F", () => goToFeed());
keyboardHandler.on("R", () => handleRefreshAllFeeds());
keyboardHandler.on("?", () => showKeyboardShortcuts());
keyboardHandler.on("+", () => goToAddSubscription());
keyboardHandler.on("#", () => unsubscribeFromFeed());
keyboardHandler.on("/", (e) => setFocusToSearchInput(e));
keyboardHandler.on("Escape", () => ModalHandler.close());