فهرست منبع

add "do not include the saved date" option
(fix #1058)

Gildas 3 سال پیش
والد
کامیت
e49cfe30bf

+ 8 - 0
_locales/de/messages.json

@@ -175,6 +175,10 @@
 		"message": "Einfügen Inhalt des Infoknopfs in die gespeicherte Seite",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "Enthalten nicht das gespeicherte Datum",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "Inhalt des Infoknopfs im Dialogfenster eingeben",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "Verborgene Elemente entfernen",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infoknopf",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Bilder",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/en/messages.json

@@ -175,6 +175,10 @@
 		"message": "include the infobar in the saved page",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "do not include the saved date",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "open a prompt dialog to edit the infobar content",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "remove hidden elements",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Images",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/es/messages.json

@@ -175,6 +175,10 @@
 		"message": "incluir la barra informativa en la página guardada",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "no incluya la fecha guardada",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "abrir un cuadro de diálogo para editar el contenido de la barra informativa",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "eliminar elementos ocultos (hidden)",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Barra informativa",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Imágenes",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/fr/messages.json

@@ -175,6 +175,10 @@
 		"message": "inclure la barre d'information dans la page sauvegardée",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "ne pas inclure la date de sauvegarde",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "ouvrir une boite de dialogue pour éditer le contenu de la barre d'information",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "supprimer les élements cachés",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Barre d'information",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Images",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/it/messages.json

@@ -175,6 +175,10 @@
 		"message": "includi una barra informativa nella pagina salvata",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "non includere la data di salvataggio",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "Apri un finestra di dialogo per modificare il contenuto della barra informativa",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "rimuovi elementi nascosti",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Immagini",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/ja/messages.json

@@ -175,6 +175,10 @@
 		"message": "保存されたページに、infobar を含める",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "do not include the saved date",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "infobar のコンテンツを編集するためのプロンプトダイアログを開く",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "隠された要素を削除する",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "画像",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/pl/messages.json

@@ -175,6 +175,10 @@
 		"message": "dołączaj pasek informacyjny do zapisanej strony",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "do not include the saved date",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "otwieraj okno dialogowe z monitem, aby edytować zawartość paska informacyjnego",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "usuwaj ukryte elementy",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Obrazy",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/pt_br/messages.json

@@ -175,6 +175,10 @@
 		"message": "incluir o infobar no site salvo",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "não incluir data de salvamento",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "abrir um diálogo com aviso para editar conteúdo do infobar",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "remover elementos escondidos",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Imagens",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/ru/messages.json

@@ -175,6 +175,10 @@
 		"message": "добавить информационную панель в сохраняемую страницу",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "do not include the saved date",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "открыть диалоговое окно для редактирования содержимого информационной панели",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "удалить скрытые элементы",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Изображения",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/uk/messages.json

@@ -175,6 +175,10 @@
 		"message": "додавати інформ. панель в сторінку що зберігається",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "не включати збережену дату",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "відкривати діалогове вікно для редагування вмісту інформаційної панелі",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "видалити приховані елементи",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Інфобар",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "Зображення",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/zh_CN/messages.json

@@ -175,6 +175,10 @@
 		"message": "在已保存页面中将信息栏包括在内",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "do not include the saved date",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "打开一个提示对话框来编辑信息栏内容",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "移除隐藏元素",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "图片",
 		"description": "Options sub-title: 'Images'"

+ 8 - 0
_locales/zh_TW/messages.json

@@ -175,6 +175,10 @@
 		"message": "在已保存頁面中將信息欄包括在內",
 		"description": "Options page label: 'include the infobar in the saved page'"
 	},
+	"optionRemoveInfobarSavedDate": {
+		"message": "do not include the saved date",
+		"description": "Options page label: 'do not include the saved date'"
+	},
 	"optionConfirmInfobar": {
 		"message": "打開一個提示對話框來編輯信息欄內容",
 		"description": "Options page label: 'open a prompt dialog to edit the infobar content'"
@@ -243,6 +247,10 @@
 		"message": "移除隱藏元素",
 		"description": "Options page label: 'remove hidden elements'"
 	},
+	"optionsInfobarSubTitle": {
+		"message": "Infobar",
+		"description": "Options sub-title: 'Infobar'"
+	},
 	"optionsImagesSubTitle": {
 		"message": "圖片",
 		"description": "Options sub-title: 'Images'"

+ 1 - 0
src/core/bg/config.js

@@ -127,6 +127,7 @@ const DEFAULT_CONFIG = {
 	insertMetaCSP: true,
 	passReferrerOnError: false,
 	insertSingleFileComment: true,
+	removeSavedDate: false,
 	blockMixedContent: false,
 	saveOriginalURLs: false,
 	acceptHeaders: {

+ 7 - 0
src/ui/bg/ui-options.js

@@ -137,6 +137,7 @@ const titleLabel = document.getElementById("titleLabel");
 const userInterfaceLabel = document.getElementById("userInterfaceLabel");
 const filenameLabel = document.getElementById("filenameLabel");
 const htmlContentLabel = document.getElementById("htmlContentLabel");
+const infobarLabel = document.getElementById("infobarLabel");
 const imagesLabel = document.getElementById("imagesLabel");
 const stylesheetsLabel = document.getElementById("stylesheetsLabel");
 const fontsLabel = document.getElementById("fontsLabel");
@@ -166,6 +167,7 @@ const infobarTemplateLabel = document.getElementById("infobarTemplateLabel");
 const blockMixedContentLabel = document.getElementById("blockMixedContentLabel");
 const saveOriginalURLsLabel = document.getElementById("saveOriginalURLsLabel");
 const includeInfobarLabel = document.getElementById("includeInfobarLabel");
+const removeInfobarSavedDateLabel = document.getElementById("removeInfobarSavedDateLabel");
 const miscLabel = document.getElementById("miscLabel");
 const helpLabel = document.getElementById("helpLabel");
 const synchronizeLabel = document.getElementById("synchronizeLabel");
@@ -254,6 +256,7 @@ const infobarTemplateInput = document.getElementById("infobarTemplateInput");
 const blockMixedContentInput = document.getElementById("blockMixedContentInput");
 const saveOriginalURLsInput = document.getElementById("saveOriginalURLsInput");
 const includeInfobarInput = document.getElementById("includeInfobarInput");
+const removeInfobarSavedDateInput = document.getElementById("removeInfobarSavedDateInput");
 const confirmInfobarInput = document.getElementById("confirmInfobarInput");
 const autoCloseInput = document.getElementById("autoCloseInput");
 const openEditorInput = document.getElementById("openEditorInput");
@@ -624,6 +627,7 @@ titleLabel.textContent = browser.i18n.getMessage("optionsTitle");
 userInterfaceLabel.textContent = browser.i18n.getMessage("optionsUserInterfaceSubTitle");
 filenameLabel.textContent = browser.i18n.getMessage("optionsFileNameSubTitle");
 htmlContentLabel.textContent = browser.i18n.getMessage("optionsHTMLContentSubTitle");
+infobarLabel.textContent = browser.i18n.getMessage("optionsInfobarSubTitle");
 imagesLabel.textContent = browser.i18n.getMessage("optionsImagesSubTitle");
 stylesheetsLabel.textContent = browser.i18n.getMessage("optionsStylesheetsSubTitle");
 fontsLabel.textContent = browser.i18n.getMessage("optionsFontsSubTitle");
@@ -639,6 +643,7 @@ infobarTemplateLabel.textContent = browser.i18n.getMessage("optionInfobarTemplat
 blockMixedContentLabel.textContent = browser.i18n.getMessage("optionBlockMixedContent");
 saveOriginalURLsLabel.textContent = browser.i18n.getMessage("optionSaveOriginalURLs");
 includeInfobarLabel.textContent = browser.i18n.getMessage("optionIncludeInfobar");
+removeInfobarSavedDateLabel.textContent = browser.i18n.getMessage("optionRemoveInfobarSavedDate");
 confirmInfobarLabel.textContent = browser.i18n.getMessage("optionConfirmInfobar");
 autoCloseLabel.textContent = browser.i18n.getMessage("optionAutoClose");
 editorLabel.textContent = browser.i18n.getMessage("optionsEditorSubTitle");
@@ -910,6 +915,7 @@ async function refresh(profileName) {
 	blockMixedContentInput.checked = profileOptions.blockMixedContent;
 	saveOriginalURLsInput.checked = profileOptions.saveOriginalURLs;
 	includeInfobarInput.checked = profileOptions.includeInfobar;
+	removeInfobarSavedDateInput.checked = profileOptions.removeSavedDate;
 	confirmInfobarInput.checked = profileOptions.confirmInfobarContent;
 	autoCloseInput.checked = profileOptions.autoClose;
 	openEditorInput.checked = profileOptions.openEditor;
@@ -1011,6 +1017,7 @@ async function update() {
 			blockMixedContent: blockMixedContentInput.checked,
 			saveOriginalURLs: saveOriginalURLsInput.checked,
 			includeInfobar: includeInfobarInput.checked,
+			removeSavedDate: removeInfobarSavedDateInput.checked,
 			confirmInfobarContent: confirmInfobarInput.checked,
 			autoClose: autoCloseInput.checked,
 			openEditor: openEditorInput.checked,

+ 41 - 33
src/ui/pages/help.html

@@ -111,34 +111,6 @@
 							resources. This reminds you that you should not close the tab. </p>
 						<p class="notice">It is recommended to <u>check</u> this option</p>
 					</li>
-					<li data-options-label="displayInfobarLabel" id="displayInfobarOption"> <span class="option">Option:
-							display an infobar when
-							viewing a saved page</span>
-						<p>Check this option to display the ℹ button at the top right of the page when viewing a saved
-							page. By clicking this button, you can get more information about the saved date and open
-							the original URL.</p>
-						<p class="notice">It is recommended to <u>check</u> this option</p>
-					</li>
-					<li data-options-label="infobarTemplateLabel"> <span class="option">Option: template of the infobar
-							content</span>
-						<p>The template allows you to customize the content displayed in the infobar. You can use any
-							valid character, <code>\n</code> for new lines or <code>\t</code> for tabs. You can also use
-							any variables from <a href="#template-variables">this list</a> anywhere in the template. If
-							the template or the resulting content is empty, the infobar will display the saved date by
-							default. </p>
-						<p>Template examples:</p>
-						<ul>
-							<li><code>{url-href} ({date-iso})</code> will produce contents like "https://www.example.com
-								(2018-09-15 11 06 03 PM)".</li>
-							<li><code>Title: {page-title}</code> will produce contents like "Title: Example Domain" for
-								a page having "Example Domain" as title.</li>
-						</ul>
-					</li>
-					<li data-options-label="confirmInfobarLabel"> <span class="option">Option: open a prompt dialog to
-							edit the infobar content</span>
-						<p>Check this option to display a prompt dialog in order to confirm the infobar content before
-							saving the page. </p>
-					</li>
 					<li data-options-label="openSavedPageLabel" id="openSavedPageOption"> <span class="option">Option:
 							open saved pages in a new
 							tab</span>
@@ -230,11 +202,10 @@
 							original attribute name (e.g. "data-sf-original-src", "data-sf-original-href") for HTML
 							contents. For CSS contents, URLs are stored as comments beginning with "original URL:".
 					</li>
-					<li data-options-label="includeInfobarLabel"> <span class="option"></span>: include infobar in
-						the saved page</span>
-						<p>Check this
-							option to display the ℹ button at the top right of the page when viewing a saved page in a
-							browser where SingleFile is not installed.</p>
+					<li data-options-label="removeInfobarSavedDateLabel">
+						<span class="option">Option: do not include the saved date</span>
+						<p>Check this option to remove the saved date included in the saved page and displayed in the
+							infobar.</p>
 					</li>
 					<li data-options-label="saveRawPageLabel"> <span class="option">Option: save raw page</span>
 						<p>Check this option to save the raw HTML file that the browser received. When this option is
@@ -243,6 +214,43 @@
 						<p class="notice">It is recommended to <u>uncheck</u> this option</p>
 					</li>
 				</ul>
+				<p>Infobar</p>
+				<ul>
+					<li data-options-label="displayInfobarLabel" id="displayInfobarOption"> <span class="option">Option:
+							display an infobar when
+							viewing a saved page</span>
+						<p>Check this option to display the ℹ button at the top right of the page when viewing a saved
+							page. By clicking this button, you can get more information about the saved date and open
+							the original URL.</p>
+						<p class="notice">It is recommended to <u>check</u> this option</p>
+					</li>
+					<li data-options-label="infobarTemplateLabel"> <span class="option">Option: template of the infobar
+							content</span>
+						<p>The template allows you to customize the content displayed in the infobar. You can use any
+							valid character, <code>\n</code> for new lines or <code>\t</code> for tabs. You can also use
+							any variables from <a href="#template-variables">this list</a> anywhere in the template. If
+							the template or the resulting content is empty, the infobar will display the saved date by
+							default. </p>
+						<p>Template examples:</p>
+						<ul>
+							<li><code>{url-href} ({date-iso})</code> will produce contents like "https://www.example.com
+								(2018-09-15 11 06 03 PM)".</li>
+							<li><code>Title: {page-title}</code> will produce contents like "Title: Example Domain" for
+								a page having "Example Domain" as title.</li>
+						</ul>
+					</li>
+					<li data-options-label="confirmInfobarLabel"> <span class="option">Option: open a prompt dialog to
+							edit the infobar content</span>
+						<p>Check this option to display a prompt dialog in order to confirm the infobar content before
+							saving the page. </p>
+					</li>
+					<li data-options-label="includeInfobarLabel"> <span class="option"></span>Option: include infobar in
+						the saved page</span>
+						<p>Check this
+							option to display the ℹ button at the top right of the page when viewing a saved page in a
+							browser where SingleFile is not installed.</p>
+					</li>
+				</ul>
 				<p>Stylesheets</p>
 				<ul>
 					<li data-options-label="removeUnusedStylesLabel"> <span class="option">Option: remove unused

+ 21 - 14
src/ui/pages/options.html

@@ -36,18 +36,6 @@
 				<label for="shadowEnabledInput" id="shadowEnabledLabel"></label>
 				<input type="checkbox" id="shadowEnabledInput">
 			</div>
-			<div class="option" id="displayInfobarOption">
-				<label for="displayInfobarInput" id="displayInfobarLabel"></label>
-				<input type="checkbox" id="displayInfobarInput">
-			</div>
-			<div class="option vertical">
-				<label for="infobarTemplateInput" id="infobarTemplateLabel"></label>
-				<input type="text" id="infobarTemplateInput">
-			</div>
-			<div class="option">
-				<label for="confirmInfobarInput" id="confirmInfobarLabel"></label>
-				<input type="checkbox" id="confirmInfobarInput">
-			</div>
 			<div class="option" id="openSavedPageOption">
 				<label for="openSavedPageInput" id="openSavedPageLabel"></label>
 				<input type="checkbox" id="openSavedPageInput">
@@ -110,14 +98,33 @@
 				<input type="checkbox" id="saveOriginalURLsInput">
 			</div>
 			<div class="option">
-				<label for="includeInfobarInput" id="includeInfobarLabel"></label>
-				<input type="checkbox" id="includeInfobarInput">
+				<label for="removeInfobarSavedDateInput" id="removeInfobarSavedDateLabel"></label>
+				<input type="checkbox" id="removeInfobarSavedDateInput">
 			</div>
 			<div class="option">
 				<label for="saveRawPageInput" id="saveRawPageLabel"></label>
 				<input type="checkbox" id="saveRawPageInput">
 			</div>
 		</details>
+		<details>
+			<summary id="infobarLabel"></summary>
+			<div class="option" id="displayInfobarOption">
+				<label for="displayInfobarInput" id="displayInfobarLabel"></label>
+				<input type="checkbox" id="displayInfobarInput">
+			</div>
+			<div class="option vertical">
+				<label for="infobarTemplateInput" id="infobarTemplateLabel"></label>
+				<input type="text" id="infobarTemplateInput">
+			</div>
+			<div class="option">
+				<label for="confirmInfobarInput" id="confirmInfobarLabel"></label>
+				<input type="checkbox" id="confirmInfobarInput">
+			</div>
+			<div class="option">
+				<label for="includeInfobarInput" id="includeInfobarLabel"></label>
+				<input type="checkbox" id="includeInfobarInput">
+			</div>
+		</details>
 		<details>
 			<summary id="stylesheetsLabel"></summary>
 			<div class="option">