diff --git a/js/config.js b/js/config.js
index d2520eb8fe..eccfd08451 100644
--- a/js/config.js
+++ b/js/config.js
@@ -838,7 +838,7 @@ function updatePrefsDate()
}
/**
- * Prepares message which informs that localStorage preferences are available and can be imported
+ * Prepares message which informs that localStorage preferences are available and can be imported or deleted
*/
function offerPrefsAutoimport()
{
@@ -857,6 +857,14 @@ function offerPrefsAutoimport()
prefs_autoload: 'hide'
}, null, 'html');
return;
+ } else if ($a.attr('href') == '#delete') {
+ $cnt.remove();
+ localStorage.clear();
+ $.post('index.php', {
+ token: $cnt.find('input[name=token]').val(),
+ prefs_autoload: 'hide'
+ }, null, 'html');
+ return;
}
$cnt.find('input[name=json]').val(window.localStorage.config);
$cnt.find('form').submit();
diff --git a/templates/prefs_autoload.phtml b/templates/prefs_autoload.phtml
index 37863e9557..fa71cdd73c 100644
--- a/templates/prefs_autoload.phtml
+++ b/templates/prefs_autoload.phtml
@@ -11,5 +11,6 @@
= __('Yes') ?>
/ = __('No') ?>
+ / = __('Delete Settings') ?>
-
\ No newline at end of file
+