refactor: remove unused function
parent
3c43a1cdd1
commit
f4f6208420
|
@ -43,17 +43,8 @@ const rebloggedBy = $computed(() => props.status.reblog ? props.status.account :
|
||||||
|
|
||||||
const statusRoute = $computed(() => getStatusRoute(status))
|
const statusRoute = $computed(() => getStatusRoute(status))
|
||||||
|
|
||||||
const el = ref<HTMLElement>()
|
|
||||||
const router = useRouter()
|
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) {
|
function go(evt: MouseEvent | KeyboardEvent) {
|
||||||
if (evt.metaKey || evt.ctrlKey) {
|
if (evt.metaKey || evt.ctrlKey) {
|
||||||
window.open(statusRoute.href)
|
window.open(statusRoute.href)
|
||||||
|
|
Loading…
Reference in New Issue