diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 4c25704ef..ef2bccb5d 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,7 +1,7 @@ module.exports = (grunt) -> importHTML = (filename) -> - "\"\"\"#{grunt.file.read("src/General/html/#{filename}.html").replace(/^\s+|\s+$ window.location = "//boards.4chan.org/#{g.BOARD}/catalog" @update() if g.VIEW is 'index' diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index a2aefd8f5..c50bdad80 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -267,9 +267,11 @@ Settings = $.add div, ta return div.innerHTML = <%= importHTML('Settings/Filter-guide') %> + $('.warning', div).hidden = Conf['Filter'] sauce: (section) -> section.innerHTML = <%= importHTML('Settings/Sauce') %> + $('.warning', section).hidden = Conf['Sauce'] ta = $ 'textarea', section $.get 'sauces', Conf['sauces'], (item) -> ta.value = item['sauces'] @@ -277,6 +279,8 @@ Settings = advanced: (section) -> section.innerHTML = <%= importHTML('Settings/Advanced') %> + warning.hidden = Conf[warning.dataset.feature] for warning in $$ '.warning', section + items = {} inputs = {} for name in ['boardnav', 'time', 'backlink', 'fileInfo', 'favicon', 'sageEmoji', 'emojiPos', 'usercss'] @@ -305,9 +309,14 @@ Settings = Settings[key].call input return - $.on $('input[name=Interval]', section), 'change', ThreadUpdater.cb.interval - $.on $('input[name="Custom CSS"]', section), 'change', Settings.togglecss - $.on $.id('apply-css'), 'click', Settings.usercss + interval = $ 'input[name="Interval"]', section + customCSS = $ 'input[name="Custom CSS"]', section + interval.value = Conf['Interval'] + customCSS.checked = Conf['Custom CSS'] + inputs['usercss'].disabled = !Conf['Custom CSS'] + $.on interval, 'change', ThreadUpdater.cb.interval + $.on customCSS, 'change', Settings.togglecss + $.on $.id('apply-css'), 'click', Settings.usercss archBoards = {} for {name, boards, files, software, withCredentials} in Redirect.archives @@ -434,6 +443,7 @@ Settings = keybinds: (section) -> section.innerHTML = <%= importHTML('Settings/Keybinds') %> + $('.warning', section).hidden = Conf['Keybinds'] tbody = $ 'tbody', section items = {} diff --git a/src/General/html/Features/Index-navlinks.html b/src/General/html/Features/Index-navlinks.html index dfbe4dc98..83adcf21e 100644 --- a/src/General/html/Features/Index-navlinks.html +++ b/src/General/html/Features/Index-navlinks.html @@ -1,4 +1,4 @@ -Return +Return Catalog Bottom diff --git a/src/General/html/Settings/Advanced.html b/src/General/html/Settings/Advanced.html index 556153d65..eb5e51720 100755 --- a/src/General/html/Settings/Advanced.html +++ b/src/General/html/Settings/Advanced.html @@ -1,6 +1,6 @@
Archiver -
404 Redirect is disabled.
+
404 Redirect is disabled.
@@ -38,7 +38,7 @@
- Time Formatting is disabled. + Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
@@ -50,12 +50,12 @@
- Quote Backlinks formatting is disabled. + Quote Backlinks formatting is disabled.
:
- File Info Formatting is disabled. + File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
@@ -82,7 +82,7 @@
- Unread Favicon is disabled. + Unread Favicon is disabled. @@ -112,16 +112,16 @@
- Thread Updater is disabled. + Thread Updater is disabled.
- Interval: + Interval:
- + - -
\ No newline at end of file + + diff --git a/src/General/html/Settings/Filter-guide.html b/src/General/html/Settings/Filter-guide.html index 579a12137..aba7d629a 100755 --- a/src/General/html/Settings/Filter-guide.html +++ b/src/General/html/Settings/Filter-guide.html @@ -1,4 +1,4 @@ -
Filter is disabled.
+
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
diff --git a/src/General/html/Settings/Keybinds.html b/src/General/html/Settings/Keybinds.html index e8c29434c..aeade72e7 100755 --- a/src/General/html/Settings/Keybinds.html +++ b/src/General/html/Settings/Keybinds.html @@ -1,6 +1,6 @@ -

Keybinds are disabled.
+
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
-
ActionsKeybinds
\ No newline at end of file + diff --git a/src/General/html/Settings/Sauce.html b/src/General/html/Settings/Sauce.html index 69548c470..a9e5a1b25 100755 --- a/src/General/html/Settings/Sauce.html +++ b/src/General/html/Settings/Sauce.html @@ -1,4 +1,4 @@ -
Sauce is disabled.
+
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.