Quellcode durchsuchen

save selected contents if any of the selected tabs when pressing the keyboard shortcut (fix #527)

Gildas vor 5 Jahren
Ursprung
Commit
629cfa7cb0

+ 3 - 3
_locales/de/messages.json

@@ -3,9 +3,9 @@
 		"message": "Speichern einer kompletten Webseite in eine einzige HTML-Datei",
 		"description": "Description of the extension."
 	},
-	"commandSaveTab": {
-		"message": "Speichern der aktuellen Tab oder des ausgewählten Inhalts",
-		"description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+	"commandSaveSelectedTabs": {
+		"message": "Speichern der ausgewählten Tabs oder ihrer ausgewählten Inhalte",
+		"description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
 	},
 	"commandSaveAllTabs": {
 		"message": "Speichern aller Tabs",

+ 3 - 3
_locales/en/messages.json

@@ -3,9 +3,9 @@
 		"message": "Save a complete page into a single HTML file",
 		"description": "Description of the extension."
 	},
-    "commandSaveTab": {
-        "message": "Save the current tab or the selected content",
-        "description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+    "commandSaveSelectedTabs": {
+        "message": "Save the selected tabs or their selected contents",
+        "description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
     },
     "commandSaveAllTabs": {
         "message": "Save all tabs",

+ 3 - 3
_locales/es/messages.json

@@ -3,9 +3,9 @@
 		"message": "Guarda una página completa en un único archivo HTML",
 		"description": "Description of the extension."
 	},
-    "commandSaveTab": {
-        "message": "Guardar la pestaña actual o el contenido seleccionado",
-        "description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+    "commandSaveSelectedTabs": {
+        "message": "Guardar las pestañas seleccionadas o su contenidos seleccionados",
+        "description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
     },
     "commandSaveAllTabs": {
         "message": "Guardar todas las pestañas",

+ 3 - 3
_locales/fr/messages.json

@@ -3,9 +3,9 @@
 		"message": "Sauvegardez une page complète dans un simple fichier HTML",
 		"description": "Description of the extension."
 	},
-	"commandSaveTab": {
-		"message": "Sauver l'onglet courant ou le contenu sélectionné",
-		"description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+	"commandSaveSelectedTabs": {
+		"message": "Sauvegarder les onglets sélectionnés ou leurs contenus sélectionnés",
+		"description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
 	},
 	"commandSaveAllTabs": {
 		"message": "Sauver tous les onglets",

+ 3 - 3
_locales/ja/messages.json

@@ -3,9 +3,9 @@
 		"message": "完全なページを単一の HTML ファイルに保存する",
 		"description": "Description of the extension."
 	},
-    "commandSaveTab": {
-        "message": "Save the current tab or the selected content",
-        "description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+    "commandSaveSelectedTabs": {
+        "message": "Save the selected tabs or their selected contents",
+        "description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
     },
     "commandSaveAllTabs": {
         "message": "すべてのタブを保存",

+ 3 - 3
_locales/pl/messages.json

@@ -3,9 +3,9 @@
 		"message": "Zapisuj kompletną stronę w pojedynczym pliku HTML.",
 		"description": "Description of the extension."
 	},
-    "commandSaveTab": {
-        "message": "Zapisz bieżącą kartę lub wybraną zawartość",
-        "description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+    "commandSaveSelectedTabs": {
+        "message": "Save the selected tabs or their selected contents",
+        "description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
     },
     "commandSaveAllTabs": {
         "message": "Zapisz wszystkie karty",

+ 3 - 3
_locales/ru/messages.json

@@ -3,9 +3,9 @@
 		"message": "Сохранение полной страницы в едином HTML-файле",
 		"description": "Description of the extension."
 	},
-	"commandSaveTab": {
-		"message": "Сохранить текущую вкладку или выделенное",
-		"description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+	"commandSaveSelectedTabs": {
+		"message": "Save the selected tabs or their selected contents",
+		"description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
 	},
 	"commandSaveAllTabs": {
 		"message": "Сохранить все вкладки",

+ 3 - 3
_locales/uk/messages.json

@@ -3,9 +3,9 @@
 		"message": "Зберегти всю сторінку в один HTML-файл",
 		"description": "Description of the extension."
 	},
-    "commandSaveTab": {
-        "message": "Save the current tab or the selected content",
-        "description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+    "commandSaveSelectedTabs": {
+        "message": "Save the selected tabs or their selected contents",
+        "description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
     },
     "commandSaveAllTabs": {
         "message": "Зберегти всі вкладки",

+ 3 - 3
_locales/zh_CN/messages.json

@@ -3,9 +3,9 @@
 		"message": "将一个完整的页面保存到单个 HTML 文件中",
 		"description": "Description of the extension."
 	},
-	"commandSaveTab": {
-		"message": "保存当前标签页或选中部分",
-		"description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+	"commandSaveSelectedTabs": {
+		"message": "Save the selected tabs or their selected contents",
+		"description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
 	},
 	"commandSaveAllTabs": {
 		"message": "保存所有标签页",

+ 3 - 3
_locales/zh_TW/messages.json

@@ -3,9 +3,9 @@
 		"message": "將一個完整的頁面保存到單個 HTML 文件中",
 		"description": "Description of the extension."
 	},
-	"commandSaveTab": {
-		"message": "保存當前標籤頁或選中部分",
-		"description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+	"commandSaveSelectedTabs": {
+		"message": "Save the selected tabs or their selected contents",
+		"description": "Command (Ctrl+Shift+Y): 'Save the selected tabs or their selected contents'"
 	},
 	"commandSaveAllTabs": {
 		"message": "保存所有標籤頁",

+ 2 - 3
extension/ui/bg/ui-commands.js

@@ -30,9 +30,8 @@ singlefile.extension.ui.bg.commands = (() => {
 
 	if (BROWSER_COMMANDS_API_SUPPORTED) {
 		commands.onCommand.addListener(async command => {
-			if (command == "save-tab") {
-				const allTabs = await singlefile.extension.core.bg.tabs.get({ currentWindow: true, active: true });
-				allTabs.length = 1;
+			if (command == "save-selected-tabs") {
+				const allTabs = await singlefile.extension.core.bg.tabs.get({ currentWindow: true, highlighted: true });
 				singlefile.extension.core.bg.business.saveTabs(allTabs, { optionallySelected: true });
 			}
 			if (command == "save-all-tabs") {

+ 2 - 2
manifest.json

@@ -126,11 +126,11 @@
 		"default_title": "__MSG_buttonDefaultTooltip__"
 	},
 	"commands": {
-		"save-tab": {
+		"save-selected-tabs": {
 			"suggested_key": {
 				"default": "Ctrl+Shift+Y"
 			},
-			"description": "__MSG_commandSaveTab__"
+			"description": "__MSG_commandSaveSelectedTabs__"
 		},
 		"save-all-tabs": {
 			"suggested_key": {