From 377b52423d1460791e340534a66add06bd4a33ba Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Fri, 15 Nov 2019 12:39:49 +0100 Subject: Only enable max with if wrapping is enabled --- js/main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/main.ts b/js/main.ts index e8c2cfb..7e0c8a1 100644 --- a/js/main.ts +++ b/js/main.ts @@ -92,7 +92,8 @@ const settings = new KeyValueStore({ })(); (() => { - const contentEl = document.getElementsByClassName('content')[0]; + const wrapEl = document.getElementsByClassName('wrap')[0]; + const contentEl = wrapEl.getElementsByClassName('content')[0]; // @@ -146,9 +147,9 @@ const settings = new KeyValueStore({ const settingWordWrapValueEl = settingWordWrapEl.getElementsByClassName('setting__value')[0]; const settingWordWrapCallback = (value: boolean) => { if (value) { - contentEl.classList.add("content--wrap"); + wrapEl.classList.add("wrap--word-wrap"); } else { - contentEl.classList.remove("content--wrap"); + wrapEl.classList.remove("wrap--word-wrap"); } settingWordWrapValueEl.textContent = value ? '[yes]' : '[no]'; -- cgit v1.2.3-70-g09d2