@@ -532,6 +544,9 @@ export default {
out.push(current);
current = [];
+ } else if ( type === 'space' || type === 'small-space' ) {
+ current.push(val.v);
+
} else if ( this.displayAction(val.v) )
current.push(val);
}
@@ -593,6 +608,14 @@ export default {
this.add_pasting = false;
},
+ preparePaste() {
+ this.add_open = true;
+ this.add_pasting = true;
+ requestAnimationFrame(() => {
+ this.$refs.paste.focus()
+ });
+ },
+
addFromJSON() {
let value = this.$refs.paste.value;
this.closeAdd();
diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js
index 200848a0..936a3ae3 100644
--- a/src/sites/twitch-twilight/modules/chat/index.js
+++ b/src/sites/twitch-twilight/modules/chat/index.js
@@ -662,6 +662,7 @@ export default class ChatHook extends Module {
const width = this.chat.context.get('chat.width'),
action_size = this.chat.context.get('chat.actions.size'),
+ ts_size = this.chat.context.get('chat.timestamp-size'),
size = this.chat.context.get('chat.font-size'),
emote_alignment = this.chat.context.get('chat.lines.emote-alignment'),
lh = Math.round((20/12) * size);
@@ -670,6 +671,11 @@ export default class ChatHook extends Module {
if ( font.indexOf(' ') !== -1 && font.indexOf(',') === -1 && font.indexOf('"') === -1 && font.indexOf("'") === -1 )
font = `"${font}"`;
+ if ( ts_size )
+ this.css_tweaks.set('ts-size', `.chat-line__timestamp{font-size:${ts_size/10}rem}`);
+ else
+ this.css_tweaks.delete('ts-size');
+
this.css_tweaks.setVariable('chat-actions-size', `${action_size/10}rem`);
this.css_tweaks.setVariable('chat-font-size', `${size/10}rem`);
this.css_tweaks.setVariable('chat-line-height', `${lh/10}rem`);
@@ -796,6 +802,7 @@ export default class ChatHook extends Module {
this.settings.main_context.on('changed:chat.use-width', this.updateChatCSS, this);
this.chat.context.on('changed:chat.actions.size', this.updateChatCSS, this);
this.chat.context.on('changed:chat.font-size', this.updateChatCSS, this);
+ this.chat.context.on('changed:chat.timestamp-size', this.updateChatCSS, this);
this.chat.context.on('changed:chat.font-family', this.updateChatCSS, this);
this.chat.context.on('changed:chat.lines.emote-alignment', this.updateChatCSS, this);
this.chat.context.on('changed:chat.adjustment-mode', this.updateColors, this);
diff --git a/src/sites/twitch-twilight/styles/color_normalizer.scss b/src/sites/twitch-twilight/styles/color_normalizer.scss
index c8e031f7..cc36d1d4 100644
--- a/src/sites/twitch-twilight/styles/color_normalizer.scss
+++ b/src/sites/twitch-twilight/styles/color_normalizer.scss
@@ -10,7 +10,10 @@
}
.clmgr-table__row,
+ .sunlight-expanded-nav-drop-down-menu-layout__scrollable-area,
.stream-manager--page-view .mosaic-window-body,
+ .ach-card,
+ .ach-card--expanded .ach-card__inner,
.room-upsell,
.chat-room,
.qa-vod-chat,
@@ -59,6 +62,18 @@
background-color: var(--ffz-color-accent-8) !important;
}
}
+
+ .ach-q-card {
+ box-shadow: 0 0 0 1px var(--color-border-button) !important;
+ }
+
+ .ach-link:active .ach-card, .ach-link:focus .ach-card {
+ outline: .5rem auto var(--color-border-input-focus) !important;
+ }
+
+ .ach-card--expanded .ach-card__inner {
+ border-color: var(--color-border-brand) !important;
+ }
}
html {
diff --git a/src/sites/twitch-twilight/switchboard.js b/src/sites/twitch-twilight/switchboard.js
index 6c6fad33..b08c0538 100644
--- a/src/sites/twitch-twilight/switchboard.js
+++ b/src/sites/twitch-twilight/switchboard.js
@@ -70,7 +70,12 @@ export default class Switchboard extends Module {
this.location = router.props.location.pathname;
//const location = router.props.location.pathname;
- this.loadOne();
+ this.web_munch.waitForLoader().then(() => {
+ if ( this.web_munch._require )
+ return;
+
+ this.loadOne();
+ });
}
loadOne() {
diff --git a/src/utilities/compat/webmunch.js b/src/utilities/compat/webmunch.js
index cf61476d..702b0349 100644
--- a/src/utilities/compat/webmunch.js
+++ b/src/utilities/compat/webmunch.js
@@ -11,7 +11,8 @@ import { DEBUG } from '../constants';
const NAMES = [
'webpackJsonp',
- 'webpackChunktwitch_twilight'
+ 'webpackChunktwitch_twilight',
+ 'webpackChunktwitch_sunlight'
];
const HARD_MODULES = [
@@ -46,6 +47,23 @@ export default class WebMunch extends Module {
// Loaded Modules
// ========================================================================
+ waitForLoader() {
+ if ( this._original_loader )
+ return Promise.resolve();
+
+ const waiters = this._load_waiters = this._load_waiters || [];
+ return new Promise((s,f) => waiters.push([s,f]));
+ }
+
+ _resolveLoadWait(errored) {
+ const waiters = this._load_waiters;
+ this._load_waiters = null;
+
+ if ( waiters )
+ for(const pair of waiters)
+ pair[errored ? 1 : 0]();
+ }
+
hookLoader(attempts = 0) {
if ( this._original_loader )
return this.log.warn('Attempted to call hookLoader twice.');
@@ -58,8 +76,11 @@ export default class WebMunch extends Module {
}
if ( ! name ) {
- if ( attempts > 500 )
- return this.log.error("Unable to find webpack's loader after two minutes.");
+ if ( attempts > 240 ) {
+ this.log.error("Unable to find webpack's loader after one minute.");
+ this._resolveLoadWait(true);
+ return;
+ }
return setTimeout(this.hookLoader.bind(this, attempts + 1), 250);
}
@@ -75,6 +96,7 @@ export default class WebMunch extends Module {
window[name] = this.webpackJsonpv3.bind(this);
} catch(err) {
this.log.warn('Unable to wrap webpackJsonp due to write protection.');
+ this._resolveLoadWait(true);
return;
}
@@ -93,14 +115,17 @@ export default class WebMunch extends Module {
thing.push = this.webpackJsonpv4.bind(this);
} catch(err) {
this.log.warn('Unable to wrap webpackJsonp (v4) due to write protection.');
+ this._resolveLoadWait(true);
return;
}
} else {
this.log.error('webpackJsonp is of an unknown value. Unable to wrap.');
+ this._resolveLoadWait(true);
return;
}
+ this._resolveLoadWait();
this.log.info(`Found and wrapped webpack's loader after ${(attempts||0)*250}ms.`);
}
diff --git a/styles/chat.scss b/styles/chat.scss
index d538e3ba..e01342f4 100644
--- a/styles/chat.scss
+++ b/styles/chat.scss
@@ -315,6 +315,13 @@
position: relative;
}
+.ffz--room-actions {
+ .chat-input__buttons-container &.tw-flex-column {
+ margin-top: -1rem;
+ margin-bottom: -1rem;
+ }
+}
+
.ffz--modifier-actions {
position: absolute;