refactor: remove unused function

This commit is contained in:
三咲智子 Kevin Deng 2023-03-31 03:07:49 +08:00
parent 3c43a1cdd1
commit f4f6208420
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E

View file

@ -43,17 +43,8 @@ const rebloggedBy = $computed(() => props.status.reblog ? props.status.account :
const statusRoute = $computed(() => getStatusRoute(status))
const el = ref<HTMLElement>()
const router = useRouter()
function onclick(evt: MouseEvent | KeyboardEvent) {
const path = evt.composedPath() as HTMLElement[]
const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase()))
const text = window.getSelection()?.toString()
if (!el && !text)
go(evt)
}
function go(evt: MouseEvent | KeyboardEvent) {
if (evt.metaKey || evt.ctrlKey) {
window.open(statusRoute.href)