diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-11-15 12:39:49 +0100 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-11-15 12:39:49 +0100 |
commit | 377b52423d1460791e340534a66add06bd4a33ba (patch) | |
tree | f4449df712166a517e7ee941edd2b48b2a86dd5a /js | |
parent | Limit content with to 100ch (diff) | |
download | gopherproxy-377b52423d1460791e340534a66add06bd4a33ba.tar.gz gopherproxy-377b52423d1460791e340534a66add06bd4a33ba.tar.bz2 gopherproxy-377b52423d1460791e340534a66add06bd4a33ba.zip |
Only enable max with if wrapping is enabled
Diffstat (limited to 'js')
-rw-r--r-- | js/main.ts | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -92,7 +92,8 @@ const settings = new KeyValueStore({ | |||
92 | })(); | 92 | })(); |
93 | 93 | ||
94 | (() => { | 94 | (() => { |
95 | const contentEl = document.getElementsByClassName('content')[0]; | 95 | const wrapEl = document.getElementsByClassName('wrap')[0]; |
96 | const contentEl = wrapEl.getElementsByClassName('content')[0]; | ||
96 | 97 | ||
97 | // | 98 | // |
98 | 99 | ||
@@ -146,9 +147,9 @@ const settings = new KeyValueStore({ | |||
146 | const settingWordWrapValueEl = settingWordWrapEl.getElementsByClassName('setting__value')[0]; | 147 | const settingWordWrapValueEl = settingWordWrapEl.getElementsByClassName('setting__value')[0]; |
147 | const settingWordWrapCallback = (value: boolean) => { | 148 | const settingWordWrapCallback = (value: boolean) => { |
148 | if (value) { | 149 | if (value) { |
149 | contentEl.classList.add("content--wrap"); | 150 | wrapEl.classList.add("wrap--word-wrap"); |
150 | } else { | 151 | } else { |
151 | contentEl.classList.remove("content--wrap"); | 152 | wrapEl.classList.remove("wrap--word-wrap"); |
152 | } | 153 | } |
153 | 154 | ||
154 | settingWordWrapValueEl.textContent = value ? '[yes]' : '[no]'; | 155 | settingWordWrapValueEl.textContent = value ? '[yes]' : '[no]'; |