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"), [
p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Log XMLHttpRequests"), WebInspector.settings.monitoringXHREnabled));
p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Preserve log upon navigation"), WebInspector.settings.preserveConsoleLog));
- if (WebInspector.extensionServer.hasExtensions()) {
+ if (WebInspector.openAnchorLocationRegistry.handlerNames.length > 0) {
var handlerSelector = new WebInspector.HandlerSelector(WebInspector.openAnchorLocationRegistry);
p = this._appendSection(WebInspector.UIString("Extensions"));
p.appendChild(this._createCustomSetting(WebInspector.UIString("Open links in"), handlerSelector.element));
}
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 = {