Add the Sauce settings section.
This commit is contained in:
parent
d6cbf7c6b4
commit
09693bf520
File diff suppressed because one or more lines are too long
@ -243,17 +243,24 @@ a[href="javascript:;"] {
|
|||||||
left: 0;
|
left: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.section-main ul {
|
.section-main ul,
|
||||||
|
.section-sauce ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
.section-main li {
|
.section-main li,
|
||||||
|
.section-sauce li {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
}
|
}
|
||||||
.section-main label {
|
.section-main label {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
.section-sauce textarea {
|
||||||
|
height: 350px;
|
||||||
|
min-width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
.unscroll {
|
.unscroll {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -256,7 +256,21 @@ Settings =
|
|||||||
# XXX TODO
|
# XXX TODO
|
||||||
|
|
||||||
sauce: (section) ->
|
sauce: (section) ->
|
||||||
# XXX TODO
|
section.innerHTML = """
|
||||||
|
<div class=warning #{if Conf['Sauce'] then 'hidden' else ''}><code>Sauce</code> is disabled.</div>
|
||||||
|
<div>Lines starting with a <code>#</code> will be ignored.</div>
|
||||||
|
<div>You can specify a display text by appending <code>;text:[text]</code> to the url.</div>
|
||||||
|
<ul>These parameters will be replaced by their corresponding values:
|
||||||
|
<li>%turl: Thumbnail url.</li>
|
||||||
|
<li>%url: Full image url.</li>
|
||||||
|
<li>%md5: MD5 hash.</li>
|
||||||
|
<li>%board: Current board.</li>
|
||||||
|
</ul>
|
||||||
|
<textarea name=sauces class=field></textarea>
|
||||||
|
"""
|
||||||
|
sauce = $ 'textarea', section
|
||||||
|
sauce.value = $.get 'sauces', Conf['sauces']
|
||||||
|
$.on sauce, 'change', $.cb.value
|
||||||
|
|
||||||
rice: (section) ->
|
rice: (section) ->
|
||||||
# XXX TODO
|
# XXX TODO
|
||||||
@ -264,7 +278,7 @@ Settings =
|
|||||||
keybinds: (section) ->
|
keybinds: (section) ->
|
||||||
section.innerHTML = """
|
section.innerHTML = """
|
||||||
<div class=warning #{if Conf['Keybinds'] then 'hidden' else ''}><code>Keybinds</code> are disabled.</div>
|
<div class=warning #{if Conf['Keybinds'] then 'hidden' else ''}><code>Keybinds</code> are disabled.</div>
|
||||||
<div>Allowed keys: <kbd>a-z</kbd>, <kbd>0-9</kbd>, <kbd>Enter</kbd>, <kbd>Ctrl</kbd>, <kbd>Shift</kbd>, <kbd>Alt</kbd>, <kbd>Meta</kbd>, <kbd>Esc</kbd>, <kbd>Up</kbd>, <kbd>Down</kbd>, <kbd>Right</kbd>, <kbd>Left</kbd>.</div>
|
<div>Allowed keys: <kbd>a-z</kbd>, <kbd>0-9</kbd>, <kbd>Ctrl</kbd>, <kbd>Shift</kbd>, <kbd>Alt</kbd>, <kbd>Meta</kbd>, <kbd>Enter</kbd>, <kbd>Esc</kbd>, <kbd>Up</kbd>, <kbd>Down</kbd>, <kbd>Right</kbd>, <kbd>Left</kbd>.</div>
|
||||||
<div>Press <kbd>Return</kbd> to disable a keybind.</div>
|
<div>Press <kbd>Return</kbd> to disable a keybind.</div>
|
||||||
<table><tbody>
|
<table><tbody>
|
||||||
<tr><th>Actions</th><th>Keybinds</th></tr>
|
<tr><th>Actions</th><th>Keybinds</th></tr>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user