Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: Source/devtools/front_end/SettingsScreen.js

Issue 169303005: DevTools: introduce "restore defaults and reload" in settings pane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplified reload. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/inspector.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/SettingsScreen.js
diff --git a/Source/devtools/front_end/SettingsScreen.js b/Source/devtools/front_end/SettingsScreen.js
index 398efba3d500ffcb5200ee03677282a0dec127a0..beee61ff150e81204d6fd6d7f9d442fbe8cd8f7d 100644
--- a/Source/devtools/front_end/SettingsScreen.js
+++ b/Source/devtools/front_end/SettingsScreen.js
@@ -285,6 +285,8 @@ WebInspector.GenericSettingsTab = function()
this._appendDrawerNote(p.lastElementChild);
var splitVerticallyTitle = WebInspector.UIString("Split panels vertically when docked to %s", WebInspector.experimentsSettings.dockToLeft.isEnabled() ? "left or right" : "right");
p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(splitVerticallyTitle, WebInspector.settings.splitVerticallyWhenDockedToRight));
+ var panelShortcutTitle = WebInspector.UIString("Enable %s + 1-9 shortcut to switch panels", WebInspector.isMac() ? "Cmd" : "Ctrl");
+ p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(panelShortcutTitle, WebInspector.settings.shortcutPanelSwitch));
p = this._appendSection(WebInspector.UIString("Elements"));
var colorFormatElement = this._createSelectSetting(WebInspector.UIString("Color format"), [
@@ -346,8 +348,18 @@ WebInspector.GenericSettingsTab = function()
}
p = this._appendSection();
- var panelShortcutTitle = WebInspector.UIString("Enable %s + 1-9 shortcut to switch panels", WebInspector.isMac() ? "Cmd" : "Ctrl");
- p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(panelShortcutTitle, WebInspector.settings.shortcutPanelSwitch));
+
+ var restoreDefaults = p.createChild("input", "settings-tab-text-button");
+ restoreDefaults.type = "button";
+ restoreDefaults.value = WebInspector.UIString("Restore defaults and reload");
+ restoreDefaults.addEventListener("click", restoreAndReload);
+
+ function restoreAndReload()
+ {
+ if (window.localStorage)
+ window.localStorage.clear();
+ WebInspector.reload();
+ }
}
WebInspector.GenericSettingsTab.prototype = {
« no previous file with comments | « no previous file | Source/devtools/front_end/inspector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698