cleanup
This commit is contained in:
parent
18bb953afb
commit
f7a4ab2cf1
6 changed files with 25 additions and 29 deletions
|
|
@ -75,16 +75,14 @@ const ClutterTab = {
|
||||||
}
|
}
|
||||||
return valid
|
return valid
|
||||||
},
|
},
|
||||||
createFilter(
|
createFilter({
|
||||||
filter = {
|
type = 'word',
|
||||||
type: 'word',
|
value = '',
|
||||||
value: '',
|
name = 'New Filter',
|
||||||
name: 'New Filter',
|
enabled = true,
|
||||||
enabled: true,
|
expires = null,
|
||||||
expires: null,
|
hide = false,
|
||||||
hide: false,
|
}) {
|
||||||
},
|
|
||||||
) {
|
|
||||||
const newId = uuidv4()
|
const newId = uuidv4()
|
||||||
|
|
||||||
filter.order = this.muteFilters.length + 2
|
filter.order = this.muteFilters.length + 2
|
||||||
|
|
|
||||||
|
|
@ -190,16 +190,14 @@ const FilteringTab = {
|
||||||
}
|
}
|
||||||
return valid
|
return valid
|
||||||
},
|
},
|
||||||
createFilter(
|
createFilter({
|
||||||
filter = {
|
type = 'word',
|
||||||
type: 'word',
|
value = '',
|
||||||
value: '',
|
name = 'New Filter',
|
||||||
name: 'New Filter',
|
enabled = true,
|
||||||
enabled: true,
|
expires = null,
|
||||||
expires: null,
|
hide = false,
|
||||||
hide: false,
|
}) {
|
||||||
},
|
|
||||||
) {
|
|
||||||
const newId = uuidv4()
|
const newId = uuidv4()
|
||||||
|
|
||||||
filter.order = this.muteFilters.length + 2
|
filter.order = this.muteFilters.length + 2
|
||||||
|
|
|
||||||
|
|
@ -210,16 +210,16 @@ export const rgba2css = function (rgba) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rgba !== null) {
|
if (rgba !== null) {
|
||||||
if (rgba.r !== undefined && !isNaN(rgba.r)) {
|
if (rgba.r !== undefined && !Number.isNaN(rgba.r)) {
|
||||||
base.r = rgba.r
|
base.r = rgba.r
|
||||||
}
|
}
|
||||||
if (rgba.g !== undefined && !isNaN(rgba.g)) {
|
if (rgba.g !== undefined && !Number.isNaN(rgba.g)) {
|
||||||
base.g = rgba.g
|
base.g = rgba.g
|
||||||
}
|
}
|
||||||
if (rgba.b !== undefined && !isNaN(rgba.b)) {
|
if (rgba.b !== undefined && !Number.isNaN(rgba.b)) {
|
||||||
base.b = rgba.b
|
base.b = rgba.b
|
||||||
}
|
}
|
||||||
if (rgba.a !== undefined && !isNaN(rgba.a)) {
|
if (rgba.a !== undefined && !Number.isNaN(rgba.a)) {
|
||||||
base.a = rgba.a
|
base.a = rgba.a
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,13 @@ const createRuffleService = () => {
|
||||||
script.src = '/static/ruffle/ruffle.js'
|
script.src = '/static/ruffle/ruffle.js'
|
||||||
script.type = 'text/javascript'
|
script.type = 'text/javascript'
|
||||||
script.onerror = (e) => {
|
script.onerror = (e) => {
|
||||||
reject(e)
|
reject(new Error('Ruffle script errorred', e))
|
||||||
}
|
}
|
||||||
script.onabort = (e) => {
|
script.onabort = (e) => {
|
||||||
reject(e)
|
reject(new Error('Ruffle script aborted', e))
|
||||||
}
|
}
|
||||||
script.oncancel = (e) => {
|
script.oncancel = (e) => {
|
||||||
reject(e)
|
reject(new Error('Ruffle script cancelled', e))
|
||||||
}
|
}
|
||||||
script.onload = () => {
|
script.onload = () => {
|
||||||
ruffleInstance = window.RufflePlayer
|
ruffleInstance = window.RufflePlayer
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ function urlBase64ToUint8Array(base64String) {
|
||||||
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
|
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
|
||||||
const base64 = (base64String + padding)
|
const base64 = (base64String + padding)
|
||||||
.replaceAll('-', '+')
|
.replaceAll('-', '+')
|
||||||
.replace(/_/g, '/')
|
.replaceAll('_', '/')
|
||||||
|
|
||||||
const rawData = window.atob(base64)
|
const rawData = window.atob(base64)
|
||||||
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
|
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ const highlightStyle = (prefs) => {
|
||||||
|
|
||||||
const highlightClass = (user) => {
|
const highlightClass = (user) => {
|
||||||
return (
|
return (
|
||||||
'USER____' + user.screen_name?.replaceAll('.', '_').replace(/@/g, '_AT_')
|
'USER____' + user.screen_name?.replaceAll('.', '_').replaceAll('@', '_AT_')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue