|
327 | 327 | background-color: #c9302c; |
328 | 328 | } |
329 | 329 |
|
330 | | - .viewerIcons { |
331 | | - background-position: left; |
332 | | - background-repeat: no-repeat; |
333 | | - background-size: contain; |
334 | | - padding: 5px; |
335 | | - margin: 0 5px 0 0; |
336 | | - cursor: help; |
337 | | - padding-left: 34px; |
338 | | - border-radius: 25%; |
339 | | - font-variant-numeric: tabular-nums; |
340 | | - font-feature-settings: "tnum" 1, "kern" 0; |
341 | | - font-kerning: none; |
342 | | - white-space: nowrap; |
343 | | - } |
| 330 | + .viewerIcons { |
| 331 | + background-position: left; |
| 332 | + background-repeat: no-repeat; |
| 333 | + background-size: contain; |
| 334 | + padding: 5px; |
| 335 | + margin: 0 5px 0 0; |
| 336 | + cursor: help; |
| 337 | + padding-left: 34px; |
| 338 | + border-radius: 25%; |
| 339 | + font-variant-numeric: tabular-nums; |
| 340 | + font-feature-settings: "tnum" 1, "kern" 0; |
| 341 | + font-kerning: none; |
| 342 | + white-space: nowrap; |
| 343 | + } |
344 | 344 |
|
345 | 345 | @media (max-width: 600px) { |
346 | 346 | .modal .modal-content { |
@@ -3115,7 +3115,8 @@ <h3>Status</h3> |
3115 | 3115 |
|
3116 | 3116 | var timeoutDelay = 0; |
3117 | 3117 | if (urlParams.has("showtime")) { |
3118 | | - timeoutDelay = parseInt(urlParams.get("showtime")) || 20000; |
| 3118 | + timeoutDelay = parseInt(urlParams.get("showtime")); |
| 3119 | + if (isNaN(timeoutDelay)) { timeoutDelay = 20000; } |
3119 | 3120 | } |
3120 | 3121 |
|
3121 | 3122 | var waitToReveal = 0; |
@@ -3351,6 +3352,12 @@ <h3>Status</h3> |
3351 | 3352 | highlightSpecial = false; |
3352 | 3353 | } |
3353 | 3354 |
|
| 3355 | + var highlightFirstTimers = true; |
| 3356 | + if (urlParams.has("nofirsttimehighlight")) { |
| 3357 | + highlightFirstTimers = false; |
| 3358 | + document.documentElement.style.setProperty("--firstime-bgcolor", "unset"); |
| 3359 | + } |
| 3360 | + |
3354 | 3361 | var highlightDonos = true; |
3355 | 3362 | if (urlParams.has("nodonohighlight")) { |
3356 | 3363 | highlightDonos = false; |
@@ -9590,7 +9597,7 @@ <h2 id="messagesFor">Messages</h2>\ |
9590 | 9597 | node.classList.add("member"); |
9591 | 9598 | } |
9592 | 9599 |
|
9593 | | - if (data.firsttime) { |
| 9600 | + if (data.firsttime && highlightFirstTimers) { |
9594 | 9601 | node.classList.add("firsttime"); |
9595 | 9602 | } |
9596 | 9603 |
|
@@ -9808,18 +9815,18 @@ <h2 id="messagesFor">Messages</h2>\ |
9808 | 9815 | } |
9809 | 9816 | } |
9810 | 9817 |
|
9811 | | - node.rawContents = data; |
9812 | | - |
9813 | | - const metaFeatured = data.meta && data.meta.featured; |
9814 | | - |
9815 | | - if (metaFeatured) { |
9816 | | - if (autoTimeoutEnabled) { |
9817 | | - autoShowQueue.push(node); |
9818 | | - checkAutoShow(); |
9819 | | - } else { |
9820 | | - selectedMessage(false, node); |
9821 | | - } |
9822 | | - } else if (autoyoutubememberchat && (data.type == "youtube") && data.membership){ |
| 9818 | + node.rawContents = data; |
| 9819 | + |
| 9820 | + const metaFeatured = data.meta && data.meta.featured; |
| 9821 | + |
| 9822 | + if (metaFeatured) { |
| 9823 | + if (autoTimeoutEnabled) { |
| 9824 | + autoShowQueue.push(node); |
| 9825 | + checkAutoShow(); |
| 9826 | + } else { |
| 9827 | + selectedMessage(false, node); |
| 9828 | + } |
| 9829 | + } else if (autoyoutubememberchat && (data.type == "youtube") && data.membership){ |
9823 | 9830 | if (autoTimeoutEnabled) { |
9824 | 9831 | autoShowQueue.push(node); |
9825 | 9832 | checkAutoShow(); |
@@ -11149,44 +11156,44 @@ <h2 id="messagesFor">Messages</h2>\ |
11149 | 11156 | return parts.join('+'); |
11150 | 11157 | } |
11151 | 11158 |
|
11152 | | - function initHotkeys() { |
11153 | | - const storage = (chrome && chrome.storage && chrome.storage.sync) ? chrome.storage.sync : null; |
11154 | | - if (!storage) { |
11155 | | - const hotkeys = DEFAULT_HOTKEYS; |
11156 | | - document.addEventListener('keydown', (e) => { |
11157 | | - // Don't trigger if typing in input/textarea/select |
11158 | | - if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName)) return; |
11159 | | - if (e.target.isContentEditable) return; |
11160 | | - |
11161 | | - const combo = buildKeyCombo(e); |
11162 | | - const action = hotkeys[combo]; |
11163 | | - if (action) { |
11164 | | - e.preventDefault(); |
11165 | | - if (chrome && chrome.runtime && chrome.runtime.sendMessage) { |
11166 | | - chrome.runtime.sendMessage({ cmd: action }); |
11167 | | - } |
11168 | | - } |
11169 | | - }); |
11170 | | - return; |
11171 | | - } |
11172 | | - storage.get(['hotkeys'], (result) => { |
11173 | | - const hotkeys = result.hotkeys || DEFAULT_HOTKEYS; |
11174 | | - |
11175 | | - document.addEventListener('keydown', (e) => { |
11176 | | - // Don't trigger if typing in input/textarea/select |
11177 | | - if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName)) return; |
11178 | | - if (e.target.isContentEditable) return; |
11179 | | - |
11180 | | - const combo = buildKeyCombo(e); |
11181 | | - const action = hotkeys[combo]; |
11182 | | - if (action) { |
11183 | | - e.preventDefault(); |
11184 | | - chrome.runtime.sendMessage({ cmd: action }); |
11185 | | - } |
11186 | | - }); |
11187 | | - }); |
11188 | | - } |
11189 | | - |
| 11159 | + function initHotkeys() { |
| 11160 | + const storage = (chrome && chrome.storage && chrome.storage.sync) ? chrome.storage.sync : null; |
| 11161 | + if (!storage) { |
| 11162 | + const hotkeys = DEFAULT_HOTKEYS; |
| 11163 | + document.addEventListener('keydown', (e) => { |
| 11164 | + // Don't trigger if typing in input/textarea/select |
| 11165 | + if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName)) return; |
| 11166 | + if (e.target.isContentEditable) return; |
| 11167 | + |
| 11168 | + const combo = buildKeyCombo(e); |
| 11169 | + const action = hotkeys[combo]; |
| 11170 | + if (action) { |
| 11171 | + e.preventDefault(); |
| 11172 | + if (chrome && chrome.runtime && chrome.runtime.sendMessage) { |
| 11173 | + chrome.runtime.sendMessage({ cmd: action }); |
| 11174 | + } |
| 11175 | + } |
| 11176 | + }); |
| 11177 | + return; |
| 11178 | + } |
| 11179 | + storage.get(['hotkeys'], (result) => { |
| 11180 | + const hotkeys = result.hotkeys || DEFAULT_HOTKEYS; |
| 11181 | + |
| 11182 | + document.addEventListener('keydown', (e) => { |
| 11183 | + // Don't trigger if typing in input/textarea/select |
| 11184 | + if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName)) return; |
| 11185 | + if (e.target.isContentEditable) return; |
| 11186 | + |
| 11187 | + const combo = buildKeyCombo(e); |
| 11188 | + const action = hotkeys[combo]; |
| 11189 | + if (action) { |
| 11190 | + e.preventDefault(); |
| 11191 | + chrome.runtime.sendMessage({ cmd: action }); |
| 11192 | + } |
| 11193 | + }); |
| 11194 | + }); |
| 11195 | + } |
| 11196 | + |
11190 | 11197 |
|
11191 | 11198 | // Initialize hotkeys |
11192 | 11199 | initHotkeys(); |
|
0 commit comments