Use V to open original link in current tab
- To avoid a breaking change, keep v to open the original link in new tab. - People who prefers to open the link in the current tab should use V.
This commit is contained in:
parent
a96e966911
commit
6291b59849
17 changed files with 56 additions and 30 deletions
|
@ -134,6 +134,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Zur nächsten Seite gehen",
|
||||
"page.keyboard_shortcuts.open_item": "Gewählten Artikel öffnen",
|
||||
"page.keyboard_shortcuts.open_original": "Original-Artikel öffnen",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Öffne den Original-Link in der aktuellen Registerkarte",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Gewählten Artikel als gelesen/ungelesen markieren",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Aktuelle Seite als gelesen markieren",
|
||||
"page.keyboard_shortcuts.download_content": "Vollständigen Inhalt herunterladen",
|
||||
|
@ -439,6 +440,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Go to next page",
|
||||
"page.keyboard_shortcuts.open_item": "Open selected item",
|
||||
"page.keyboard_shortcuts.open_original": "Open original link",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Open original link in current tab",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Toggle read/unread",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Mark current page as read",
|
||||
"page.keyboard_shortcuts.download_content": "Download original content",
|
||||
|
@ -724,6 +726,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Ir al pagína siguiente",
|
||||
"page.keyboard_shortcuts.open_item": "Abrir el elemento seleccionado",
|
||||
"page.keyboard_shortcuts.open_original": "Abrir el enlace original",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Abrir enlace original en la pestaña actual",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Marcar como leído o no leído",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Marcar pagína actual como leída",
|
||||
"page.keyboard_shortcuts.download_content": "Descargar el contento original",
|
||||
|
@ -1008,7 +1011,8 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_previous_page": "Page précédente",
|
||||
"page.keyboard_shortcuts.go_to_next_page": "Page suivante",
|
||||
"page.keyboard_shortcuts.open_item": "Ouvrir élément sélectionné",
|
||||
"page.keyboard_shortcuts.open_original": "Ouvrir lien original",
|
||||
"page.keyboard_shortcuts.open_original": "Ouvrir le lien original",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Ouvrir le lien original dans l'onglet en cours",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Basculer entre lu/non lu",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Marquer la page actuelle comme lu",
|
||||
"page.keyboard_shortcuts.download_content": "Télécharger le contenu original",
|
||||
|
@ -1314,6 +1318,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Mostra la pagina successiva",
|
||||
"page.keyboard_shortcuts.open_item": "Apri l'articolo selezionato",
|
||||
"page.keyboard_shortcuts.open_original": "Apri la pagina web originale",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Apri il link originale nella scheda corrente",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Cambia lo stato di lettura (letto/da leggere)",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Segna la pagina attuale come letta",
|
||||
"page.keyboard_shortcuts.download_content": "Scarica il contenuto integrale",
|
||||
|
@ -1600,6 +1605,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Volgende pagina",
|
||||
"page.keyboard_shortcuts.open_item": "Open geselecteerde link",
|
||||
"page.keyboard_shortcuts.open_original": "Open originele link",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Oorspronkelijke koppeling op huidig tabblad openen",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Markeer gelezen/ongelezen",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Markeer deze pagina als gelezen",
|
||||
"page.keyboard_shortcuts.download_content": "Download originele content",
|
||||
|
@ -1904,6 +1910,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Przejdź do następnej strony",
|
||||
"page.keyboard_shortcuts.open_item": "Otwórz zaznaczony artykuł",
|
||||
"page.keyboard_shortcuts.open_original": "Otwórz oryginalny artykuł",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Otwórz oryginalny link w bieżącej karcie",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Oznacz jako przeczytane/nieprzeczytane",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Zaznacz aktualną stronę jako przeczytaną",
|
||||
"page.keyboard_shortcuts.download_content": "Pobierz oryginalną zawartość",
|
||||
|
@ -2214,6 +2221,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_previous_page": "Перейти к предыдущей странице",
|
||||
"page.keyboard_shortcuts.go_to_next_page": "Перейти к следующей странице",
|
||||
"page.keyboard_shortcuts.open_item": "Открыть выбранный элемент",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Открыть оригинальную ссылку в текущей вкладке",
|
||||
"page.keyboard_shortcuts.open_original": "Открыть оригинальную ссылку",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Переключатель прочитанного",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Отметить текущую страницу прочитанной",
|
||||
|
@ -2504,6 +2512,7 @@ var translations = map[string]string{
|
|||
"page.keyboard_shortcuts.go_to_next_page": "下一页",
|
||||
"page.keyboard_shortcuts.open_item": "打开选定的条目",
|
||||
"page.keyboard_shortcuts.open_original": "打开原始链接",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "在当前标签页中打开原始链接",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "切换已读/未读状态",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "标记当前页已读",
|
||||
"page.keyboard_shortcuts.download_content": "下载原始内容",
|
||||
|
@ -2674,13 +2683,13 @@ var translations = map[string]string{
|
|||
}
|
||||
|
||||
var translationsChecksums = map[string]string{
|
||||
"de_DE": "08618fb4a57b1d427ec627ac6c46958bbe16b262a588aa640ad5be8b5e15562d",
|
||||
"en_US": "a611f133d106bb896bbe15df036838f33b7c7848abbf15829e918233e91783eb",
|
||||
"es_ES": "f47862bcd9af07d96510c3c24f89f0718f1325cde375954babe73766c62a6eca",
|
||||
"fr_FR": "0aca382d06630935b905452960a8dceac6f062cd5ebe2967b3837006a282f171",
|
||||
"it_IT": "60716683ca6d6e311154900508c0f8c389664096f3ab41eb9dd745914d497034",
|
||||
"nl_NL": "516c91a2be0f0b5c09e0183d61e53bfce2c8f60b8a5cb06593f0170ad6043f99",
|
||||
"pl_PL": "1fcf9422514fc7ebac57355a50c37d146fad6d19b879ba0dad29c49dfb20e00a",
|
||||
"ru_RU": "e701297d7c1b456dda066877bc5c6d18c9523f96eff3b4d53d13c6e6bf8f84a6",
|
||||
"zh_CN": "4da796ef2fdaf1898d2a17be6668b8308daebc97185bf69a698809067856c6ce",
|
||||
"de_DE": "7b608117d1f832440680696aa796d0c950218e9d2ce0cc7a58c3fd183ce8527f",
|
||||
"en_US": "7842b6735d09ff9aef21439ae3b99a9bd85f6fe3764e31f77e56261f12a0d4bc",
|
||||
"es_ES": "2372fe8e0a45125b345904d1c661a81e4e5003240837cf347e78f236809b4121",
|
||||
"fr_FR": "c9371fc612b4fc75a10e2480d2fe6da1916e45b45d057fedf626eed82d75b5fa",
|
||||
"it_IT": "d86a4e99e451c0a38810c20326f6b6ac9dcb0810bdef4d4e168c025a3be3b063",
|
||||
"nl_NL": "ef7e7d20c8548a6ef96b12c3709c4da4e663a2cdc54fcdc8cfaf6f987eb4126a",
|
||||
"pl_PL": "083af42ed3123e8fcfe54204928b4f27f505bd2fdf9dc2b949f77e0c09c18ce9",
|
||||
"ru_RU": "c78a1655230afc5c4fb9ebb4ef8970b944e4b8c157db4f8b0cfc29f126de75fa",
|
||||
"zh_CN": "4c43cab1df36f656a7f8912daf5ef8fbf01a35c87f8569bca3716dbb3117f33a",
|
||||
}
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Zur nächsten Seite gehen",
|
||||
"page.keyboard_shortcuts.open_item": "Gewählten Artikel öffnen",
|
||||
"page.keyboard_shortcuts.open_original": "Original-Artikel öffnen",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Öffne den Original-Link in der aktuellen Registerkarte",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Gewählten Artikel als gelesen/ungelesen markieren",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Aktuelle Seite als gelesen markieren",
|
||||
"page.keyboard_shortcuts.download_content": "Vollständigen Inhalt herunterladen",
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Go to next page",
|
||||
"page.keyboard_shortcuts.open_item": "Open selected item",
|
||||
"page.keyboard_shortcuts.open_original": "Open original link",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Open original link in current tab",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Toggle read/unread",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Mark current page as read",
|
||||
"page.keyboard_shortcuts.download_content": "Download original content",
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Ir al pagína siguiente",
|
||||
"page.keyboard_shortcuts.open_item": "Abrir el elemento seleccionado",
|
||||
"page.keyboard_shortcuts.open_original": "Abrir el enlace original",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Abrir enlace original en la pestaña actual",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Marcar como leído o no leído",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Marcar pagína actual como leída",
|
||||
"page.keyboard_shortcuts.download_content": "Descargar el contento original",
|
||||
|
|
|
@ -128,7 +128,8 @@
|
|||
"page.keyboard_shortcuts.go_to_previous_page": "Page précédente",
|
||||
"page.keyboard_shortcuts.go_to_next_page": "Page suivante",
|
||||
"page.keyboard_shortcuts.open_item": "Ouvrir élément sélectionné",
|
||||
"page.keyboard_shortcuts.open_original": "Ouvrir lien original",
|
||||
"page.keyboard_shortcuts.open_original": "Ouvrir le lien original",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Ouvrir le lien original dans l'onglet en cours",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Basculer entre lu/non lu",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Marquer la page actuelle comme lu",
|
||||
"page.keyboard_shortcuts.download_content": "Télécharger le contenu original",
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Mostra la pagina successiva",
|
||||
"page.keyboard_shortcuts.open_item": "Apri l'articolo selezionato",
|
||||
"page.keyboard_shortcuts.open_original": "Apri la pagina web originale",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Apri il link originale nella scheda corrente",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Cambia lo stato di lettura (letto/da leggere)",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Segna la pagina attuale come letta",
|
||||
"page.keyboard_shortcuts.download_content": "Scarica il contenuto integrale",
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Volgende pagina",
|
||||
"page.keyboard_shortcuts.open_item": "Open geselecteerde link",
|
||||
"page.keyboard_shortcuts.open_original": "Open originele link",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Oorspronkelijke koppeling op huidig tabblad openen",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Markeer gelezen/ongelezen",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Markeer deze pagina als gelezen",
|
||||
"page.keyboard_shortcuts.download_content": "Download originele content",
|
||||
|
|
|
@ -131,6 +131,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "Przejdź do następnej strony",
|
||||
"page.keyboard_shortcuts.open_item": "Otwórz zaznaczony artykuł",
|
||||
"page.keyboard_shortcuts.open_original": "Otwórz oryginalny artykuł",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Otwórz oryginalny link w bieżącej karcie",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Oznacz jako przeczytane/nieprzeczytane",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Zaznacz aktualną stronę jako przeczytaną",
|
||||
"page.keyboard_shortcuts.download_content": "Pobierz oryginalną zawartość",
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
"page.keyboard_shortcuts.go_to_previous_page": "Перейти к предыдущей странице",
|
||||
"page.keyboard_shortcuts.go_to_next_page": "Перейти к следующей странице",
|
||||
"page.keyboard_shortcuts.open_item": "Открыть выбранный элемент",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "Открыть оригинальную ссылку в текущей вкладке",
|
||||
"page.keyboard_shortcuts.open_original": "Открыть оригинальную ссылку",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "Переключатель прочитанного",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "Отметить текущую страницу прочитанной",
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
"page.keyboard_shortcuts.go_to_next_page": "下一页",
|
||||
"page.keyboard_shortcuts.open_item": "打开选定的条目",
|
||||
"page.keyboard_shortcuts.open_original": "打开原始链接",
|
||||
"page.keyboard_shortcuts.open_original_same_window": "在当前标签页中打开原始链接",
|
||||
"page.keyboard_shortcuts.toggle_read_status": "切换已读/未读状态",
|
||||
"page.keyboard_shortcuts.mark_page_as_read": "标记当前页已读",
|
||||
"page.keyboard_shortcuts.download_content": "下载原始内容",
|
||||
|
|
|
@ -266,6 +266,7 @@ var templateCommonMap = map[string]string{
|
|||
<ul>
|
||||
<li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.open_original_same_window" }} = <strong>V</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
|
||||
|
@ -332,7 +333,7 @@ var templateCommonMapChecksums = map[string]string{
|
|||
"entry_pagination": "4faa91e2eae150c5e4eab4d258e039dfdd413bab7602f0009360e6d52898e353",
|
||||
"feed_list": "7b7ea2c7df07d048c83d86237d5b5e41bddce561273c652d9265950093ca261b",
|
||||
"item_meta": "34deb081a054f2948ad808bdb2c8603d6ab00c58f2f50c4ead0b47ae092888eb",
|
||||
"layout": "010e31c9dde88cb429b21f4b0c24bb3769043a3ef1ef4a57100314f5910c8725",
|
||||
"layout": "f19597d8cd74e17b33826c25b8421f46fef87276f0d95c695bba8f53bb4f95e6",
|
||||
"pagination": "3386e90c6e1230311459e9a484629bc5d5bf39514a75ef2e73bbbc61142f7abb",
|
||||
"settings_menu": "78e5a487ede18610b23db74184dab023170f9e083cc0625bc2c874d1eea1a4ce",
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@
|
|||
<ul>
|
||||
<li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.open_original_same_window" }} = <strong>V</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -491,7 +491,7 @@ a.button {
|
|||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 360px;
|
||||
width: 380px;
|
||||
overflow: auto;
|
||||
color: var(--modal-color);
|
||||
background: var(--modal-background);
|
||||
|
|
|
@ -75,7 +75,8 @@ function handleFetchOriginalContent(){if(isListView()){return;}
|
|||
let element=document.querySelector("a[data-fetch-content-entry]");if(!element){return;}
|
||||
if(element.dataset.completed){return;}
|
||||
element.innerHTML=element.dataset.labelLoading;let request=new RequestBuilder(element.dataset.fetchContentUrl);request.withCallback((response)=>{element.innerHTML=element.dataset.labelDone;element.dataset.completed=true;response.json().then((data)=>{if(data.hasOwnProperty("content")){document.querySelector(".entry-content").innerHTML=data.content;}});});request.execute();}
|
||||
function openOriginalLink(){let entryLink=document.querySelector(".entry h1 a");if(entryLink!==null){window.location.href=entryLink.getAttribute("href");return;}
|
||||
function openOriginalLink(openLinkInCurrentTab){let entryLink=document.querySelector(".entry h1 a");if(entryLink!==null){if(openLinkInCurrentTab){window.location.href=entryLink.getAttribute("href");}else{DomHelper.openNewTab(entryLink.getAttribute("href"));}
|
||||
return;}
|
||||
let currentItemOriginalLink=document.querySelector(".current-item a[data-original-link]");if(currentItemOriginalLink!==null){DomHelper.openNewTab(currentItemOriginalLink.getAttribute("href"));let currentItem=document.querySelector(".current-item");goToNextListItem();markEntryAsRead(currentItem);}}
|
||||
function openSelectedItem(){let currentItemLink=document.querySelector(".current-item .item-title a");if(currentItemLink!==null){window.location.href=currentItemLink.getAttribute("href");}}
|
||||
function unsubscribeFromFeed(){let unsubscribeLinks=document.querySelectorAll("[data-action=remove-feed]");if(unsubscribeLinks.length===1){let unsubscribeLink=unsubscribeLinks[0];let request=new RequestBuilder(unsubscribeLink.dataset.url);request.withCallback(()=>{if(unsubscribeLink.dataset.redirectUrl){window.location.href=unsubscribeLink.dataset.redirectUrl;}else{window.location.reload();}});request.execute();}}
|
||||
|
@ -99,13 +100,13 @@ function isListView(){return document.querySelector(".items")!==null;}
|
|||
function findEntry(element){if(isListView()){if(element){return DomHelper.findParent(element,"item");}else{return document.querySelector(".current-item");}}else{return document.querySelector(".entry");}}
|
||||
function handleConfirmationMessage(linkElement,callback){linkElement.style.display="none";let containerElement=linkElement.parentNode;let questionElement=document.createElement("span");let yesElement=document.createElement("a");yesElement.href="#";yesElement.appendChild(document.createTextNode(linkElement.dataset.labelYes));yesElement.onclick=(event)=>{event.preventDefault();let loadingElement=document.createElement("span");loadingElement.className="loading";loadingElement.appendChild(document.createTextNode(linkElement.dataset.labelLoading));questionElement.remove();containerElement.appendChild(loadingElement);callback(linkElement.dataset.url,linkElement.dataset.redirectUrl);};let noElement=document.createElement("a");noElement.href="#";noElement.appendChild(document.createTextNode(linkElement.dataset.labelNo));noElement.onclick=(event)=>{event.preventDefault();linkElement.style.display="inline";questionElement.remove();};questionElement.className="confirm";questionElement.appendChild(document.createTextNode(linkElement.dataset.labelQuestion+" "));questionElement.appendChild(yesElement);questionElement.appendChild(document.createTextNode(", "));questionElement.appendChild(noElement);containerElement.appendChild(questionElement);}
|
||||
function toast(msg){if(!msg)return;document.querySelector('.toast-wrap .toast-msg').innerHTML=msg;let toastWrapper=document.querySelector('.toast-wrap');toastWrapper.classList.remove('toastAnimate');setTimeout(function(){toastWrapper.classList.add('toastAnimate');},100);}
|
||||
document.addEventListener("DOMContentLoaded",function(){handleSubmitButtons();if(!document.querySelector("body[data-disable-keyboard-shortcuts=true]")){let keyboardHandler=new KeyboardHandler();keyboardHandler.on("g u",()=>goToPage("unread"));keyboardHandler.on("g b",()=>goToPage("starred"));keyboardHandler.on("g h",()=>goToPage("history"));keyboardHandler.on("g f",()=>goToFeedOrFeeds());keyboardHandler.on("g c",()=>goToPage("categories"));keyboardHandler.on("g s",()=>goToPage("settings"));keyboardHandler.on("ArrowLeft",()=>goToPrevious());keyboardHandler.on("ArrowRight",()=>goToNext());keyboardHandler.on("k",()=>goToPrevious());keyboardHandler.on("p",()=>goToPrevious());keyboardHandler.on("j",()=>goToNext());keyboardHandler.on("n",()=>goToNext());keyboardHandler.on("h",()=>goToPage("previous"));keyboardHandler.on("l",()=>goToPage("next"));keyboardHandler.on("o",()=>openSelectedItem());keyboardHandler.on("v",()=>openOriginalLink());keyboardHandler.on("m",()=>handleEntryStatus());keyboardHandler.on("A",()=>markPageAsRead());keyboardHandler.on("s",()=>handleSaveEntry());keyboardHandler.on("d",()=>handleFetchOriginalContent());keyboardHandler.on("f",()=>handleBookmark());keyboardHandler.on("?",()=>showKeyboardShortcuts());keyboardHandler.on("#",()=>unsubscribeFromFeed());keyboardHandler.on("/",(e)=>setFocusToSearchInput(e));keyboardHandler.on("Escape",()=>ModalHandler.close());keyboardHandler.listen();}
|
||||
document.addEventListener("DOMContentLoaded",function(){handleSubmitButtons();if(!document.querySelector("body[data-disable-keyboard-shortcuts=true]")){let keyboardHandler=new KeyboardHandler();keyboardHandler.on("g u",()=>goToPage("unread"));keyboardHandler.on("g b",()=>goToPage("starred"));keyboardHandler.on("g h",()=>goToPage("history"));keyboardHandler.on("g f",()=>goToFeedOrFeeds());keyboardHandler.on("g c",()=>goToPage("categories"));keyboardHandler.on("g s",()=>goToPage("settings"));keyboardHandler.on("ArrowLeft",()=>goToPrevious());keyboardHandler.on("ArrowRight",()=>goToNext());keyboardHandler.on("k",()=>goToPrevious());keyboardHandler.on("p",()=>goToPrevious());keyboardHandler.on("j",()=>goToNext());keyboardHandler.on("n",()=>goToNext());keyboardHandler.on("h",()=>goToPage("previous"));keyboardHandler.on("l",()=>goToPage("next"));keyboardHandler.on("o",()=>openSelectedItem());keyboardHandler.on("v",()=>openOriginalLink());keyboardHandler.on("V",()=>openOriginalLink(true));keyboardHandler.on("m",()=>handleEntryStatus());keyboardHandler.on("A",()=>markPageAsRead());keyboardHandler.on("s",()=>handleSaveEntry());keyboardHandler.on("d",()=>handleFetchOriginalContent());keyboardHandler.on("f",()=>handleBookmark());keyboardHandler.on("?",()=>showKeyboardShortcuts());keyboardHandler.on("#",()=>unsubscribeFromFeed());keyboardHandler.on("/",(e)=>setFocusToSearchInput(e));keyboardHandler.on("Escape",()=>ModalHandler.close());keyboardHandler.listen();}
|
||||
let touchHandler=new TouchHandler();touchHandler.listen();onClick("a[data-save-entry]",(event)=>handleSaveEntry(event.target));onClick("a[data-toggle-bookmark]",(event)=>handleBookmark(event.target));onClick("a[data-fetch-content-entry]",()=>handleFetchOriginalContent());onClick("a[data-action=search]",(event)=>setFocusToSearchInput(event));onClick("a[data-action=markPageAsRead]",()=>handleConfirmationMessage(event.target,()=>markPageAsRead()));onClick("a[data-toggle-status]",(event)=>handleEntryStatus(event.target));onClick("a[data-confirm]",(event)=>handleConfirmationMessage(event.target,(url,redirectURL)=>{let request=new RequestBuilder(url);request.withCallback(()=>{if(redirectURL){window.location.href=redirectURL;}else{window.location.reload();}});request.execute();}));if(document.documentElement.clientWidth<600){onClick(".logo",()=>toggleMainMenu());onClick(".header nav li",(event)=>onClickMainMenuListItem(event));}
|
||||
if("serviceWorker"in navigator){let scriptElement=document.getElementById("service-worker-script");if(scriptElement){navigator.serviceWorker.register(scriptElement.src);}}});})();`,
|
||||
"sw": `'use strict';self.addEventListener("fetch",(event)=>{if(event.request.url.includes("/feed/icon/")){event.respondWith(caches.open("feed_icons").then((cache)=>{return cache.match(event.request).then((response)=>{return response||fetch(event.request).then((response)=>{cache.put(event.request,response.clone());return response;});});}));}});`,
|
||||
}
|
||||
|
||||
var JavascriptsChecksums = map[string]string{
|
||||
"app": "9689f826a27ae23590f2315519b9850acacf7b357c7cae2bddaa64805c2877ce",
|
||||
"app": "436115885ff836169580616ff9bd10341522b7702444771f5005067b61b0be6c",
|
||||
"sw": "55fffa223919cc18572788fb9c62fccf92166c0eb5d3a1d6f91c31f24d020be9",
|
||||
}
|
||||
|
|
|
@ -282,10 +282,14 @@ function handleFetchOriginalContent() {
|
|||
request.execute();
|
||||
}
|
||||
|
||||
function openOriginalLink() {
|
||||
function openOriginalLink(openLinkInCurrentTab) {
|
||||
let entryLink = document.querySelector(".entry h1 a");
|
||||
if (entryLink !== null) {
|
||||
window.location.href = entryLink.getAttribute("href");
|
||||
if (openLinkInCurrentTab) {
|
||||
window.location.href = entryLink.getAttribute("href");
|
||||
} else {
|
||||
DomHelper.openNewTab(entryLink.getAttribute("href"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
1
ui/static/js/bootstrap.js
vendored
1
ui/static/js/bootstrap.js
vendored
|
@ -19,6 +19,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
keyboardHandler.on("l", () => goToPage("next"));
|
||||
keyboardHandler.on("o", () => openSelectedItem());
|
||||
keyboardHandler.on("v", () => openOriginalLink());
|
||||
keyboardHandler.on("V", () => openOriginalLink(true));
|
||||
keyboardHandler.on("m", () => handleEntryStatus());
|
||||
keyboardHandler.on("A", () => markPageAsRead());
|
||||
keyboardHandler.on("s", () => handleSaveEntry());
|
||||
|
|
Loading…
Reference in a new issue