diff --git a/localization/languages/en-US.json b/localization/languages/en-US.json
index ac4578569..b10f34c9d 100644
--- a/localization/languages/en-US.json
+++ b/localization/languages/en-US.json
@@ -176,6 +176,10 @@
"settingsProxyRules": "Proxy rules:",
"settingsProxyBypassRules": "No proxy for:",
"settingsProxyConfigurationURL": "Configuration URL",
+ "settingsHistoryEraseNow": "Clear browsing history now",
+ "settingsHistoryHeading": "Privacy and history",
+ "settingsDeleteHistory": "Are you sure you want to delete all browsing history?",
+ "settingsDeleteHistoryOnClose": "Erase browsing history when closing the browser",
/* app menu */
"appMenuFile": "File",
"appMenuNewTab": "New Tab",
diff --git a/pages/settings/index.html b/pages/settings/index.html
index f0d39774d..a5fa04870 100644
--- a/pages/settings/index.html
+++ b/pages/settings/index.html
@@ -77,6 +77,25 @@
+
+
diff --git a/pages/settings/settings.js b/pages/settings/settings.js
index bfd5e2ec2..3ed4734af 100644
--- a/pages/settings/settings.js
+++ b/pages/settings/settings.js
@@ -181,6 +181,24 @@ for (var contentType in contentTypes) {
})(contentType)
}
+/* Privacy and history */
+
+var clearHistoryButton = document.getElementById("clear-history-now")
+clearHistoryButton.addEventListener("click", () => {
+ const confirmedDeletion = confirm(l('settingsDeleteHistory'))
+ if (confirmedDeletion) {
+ try {
+ // Nuke history here with places.deleteAllHistory() ??
+ // postMessage({ message: { action: 'deleteAllHistory' } })
+ window.alert("Your browsing history has been erased.")
+ } catch (e) {
+ window.alert("There was an error clearing your history.")
+ }
+ } else {
+ return
+ }
+})
+
/* dark mode setting */
var darkModeNever = document.getElementById('dark-mode-never')
var darkModeNight = document.getElementById('dark-mode-night')