more low-hanging fruits
This commit is contained in:
parent
4f82709bf2
commit
b2dca4a3f6
20 changed files with 45 additions and 45 deletions
|
|
@ -62,8 +62,8 @@ export const parseUser = (data) => {
|
|||
})
|
||||
output.fields_text = data.fields.map((field) => {
|
||||
return {
|
||||
name: unescape(field.name.replace(/<[^>]*>/g, '')),
|
||||
value: unescape(field.value.replace(/<[^>]*>/g, '')),
|
||||
name: unescape(field.name.replaceAll('<[^>]*>', '')),
|
||||
value: unescape(field.value.replaceAll('<[^>]*>', '')),
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { capitalize } from 'lodash'
|
|||
function humanizeErrors(errors) {
|
||||
return Object.entries(errors).reduce((errs, [k, val]) => {
|
||||
const message = val.reduce((acc, message) => {
|
||||
const key = capitalize(k.replace(/_/g, ' '))
|
||||
const key = capitalize(k.replaceAll('_', ' '))
|
||||
return acc + [key, message].join(' ') + '. '
|
||||
}, '')
|
||||
return [...errs, message]
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const createStyleSheet = (id, priority = 1000) => {
|
|||
addRule(rule) {
|
||||
let newRule = rule
|
||||
if (!CSS.supports?.('backdrop-filter', 'blur()')) {
|
||||
newRule = newRule.replace(/backdrop-filter:[^;]+;/g, '') // Remove backdrop-filter
|
||||
newRule = newRule.replaceAll('backdrop-filter:[^;]+;', '') // Remove backdrop-filter
|
||||
}
|
||||
|
||||
if (newRule.startsWith('::-webkit')) {
|
||||
|
|
@ -44,7 +44,7 @@ export const createStyleSheet = (id, priority = 1000) => {
|
|||
}
|
||||
|
||||
this.rules.push(
|
||||
newRule.replace(/var\(--shadowFilter\)[^;]*;/g, ''), // Remove shadowFilter references
|
||||
newRule.replaceAll('var\(--shadowFilter\)[^;]*;', ''), // Remove shadowFilter references
|
||||
)
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* global process */
|
||||
function urlBase64ToUint8Array(base64String) {
|
||||
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
|
||||
const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/')
|
||||
const base64 = (base64String + padding).replaceAll('-', '+').replace(/_/g, '/')
|
||||
|
||||
const rawData = window.atob(base64)
|
||||
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ export const generatePreset = (input) => {
|
|||
return composePreset(
|
||||
colors,
|
||||
generateRadii(input),
|
||||
generateShadows(input, colors.theme.colors, colors.mod),
|
||||
generateShadows(input, colors.theme.colors),
|
||||
generateFonts(input),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const highlightStyle = (prefs) => {
|
|||
|
||||
const highlightClass = (user) => {
|
||||
return (
|
||||
'USER____' + user.screen_name?.replace(/\./g, '_').replace(/@/g, '_AT_')
|
||||
'USER____' + user.screen_name?.replaceAll('\.', '_').replace(/@/g, '_AT_')
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue