mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-10-12 14:01:58 +00:00
Fix bug tokenizing cheers in messages. Try to fix any bugs getting a user for a room. Strip apollo 404 messages from Sentry. Don't show the expansion arrows in the emote menu when using a filter. Fix emoji tab completion a bit. 🐝
should not match 🍺
. Start using crossorigin for script serving. Add a debug transformation for localization.
This commit is contained in:
parent
730e2129e9
commit
e581b50b08
13 changed files with 133 additions and 18 deletions
|
@ -235,6 +235,17 @@ export function split_chars(str) {
|
|||
}
|
||||
|
||||
|
||||
export function pick_random(obj) {
|
||||
if ( ! obj )
|
||||
return null;
|
||||
|
||||
if ( ! Array.isArray(obj) )
|
||||
return obj[pick_random(Object.keys(obj))]
|
||||
|
||||
return obj[Math.floor(Math.random() * obj.length)];
|
||||
}
|
||||
|
||||
|
||||
export class SourcedSet {
|
||||
constructor() {
|
||||
this._cache = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue