feat: improve status detail page title (#485)
This commit is contained in:
parent
2339acaf5e
commit
dfd8b8968a
5 changed files with 15 additions and 2 deletions
|
@ -2,6 +2,7 @@ import type { Emoji } from 'masto'
|
|||
|
||||
export const UserLinkRE = /^https?:\/\/([^/]+)\/@([^/]+)$/
|
||||
export const TagLinkRE = /^https?:\/\/([^/]+)\/tags\/([^/]+)$/
|
||||
export const HTMLTagRE = /<[^>]+>/g
|
||||
|
||||
export function getDataUrlFromArr(arr: Uint8ClampedArray, w: number, h: number) {
|
||||
if (typeof w === 'undefined' || typeof h === 'undefined')
|
||||
|
@ -29,3 +30,7 @@ export function noop() {}
|
|||
export const useIsMac = () => computed(() =>
|
||||
useRequestHeaders(['user-agent'])['user-agent']?.includes('Macintosh')
|
||||
?? navigator?.platform?.includes('Mac') ?? false)
|
||||
|
||||
export function removeHTMLTags(str: string) {
|
||||
return str.replaceAll(HTMLTagRE, '')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue