diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py
index 4a27a8073..ad9c81fdd 100644
--- a/qutebrowser/config/config.py
+++ b/qutebrowser/config/config.py
@@ -520,6 +520,13 @@ class ConfigManager(QObject):
if self._initialized:
self._after_set(sectname, optname)
+ @pyqtSlot(str, str, str)
+ def set_javascript(self, sectname, optname, value):
+ try:
+ self.set('conf', sectname, optname, value)
+ except configtypes.ValidationError as e:
+ message.error(e)
+
@cmdutils.register(instance='config')
def save(self):
"""Save the config file."""
diff --git a/qutebrowser/html/settings.html b/qutebrowser/html/settings.html
new file mode 100644
index 000000000..d8994e111
--- /dev/null
+++ b/qutebrowser/html/settings.html
@@ -0,0 +1,37 @@
+{% extends "base.html" %}
+
+{% block script %}
+var cset = function(section, option, el) {
+ value = el.value;
+ window.qutesettings.set_javascript(section, option, value);
+}
+{% endblock %}
+
+{% block style %}
+table { border: 1px solid grey; border-collapse: collapse; }
+pre { margin: 2px; }
+th, td { border: 1px solid grey; padding: 0px 5px; }
+th { background: lightgrey; }
+th pre { color: grey; text-align: left; }
+{% endblock %}
+
+{% block content %}
+{{ title }}
{{ section }}{{ config.SECTION_DESC.get(section)|wordwrap(width=120) }} | |
---|---|
{{ d }} (Current: {{ e.value()|truncate(100) }}) | ++ + + | +