github / hotkey

Trigger an action on an element with a keyboard shortcut.

Home Page:https://github.github.com/hotkey/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can support for Open in new tab ?

dnknn opened this issue Β· comments

commented

For details, please click to seeing to πŸ‘‡
Mottie/GitHub-userscripts#123

hotkey simply calls click, so this is not its concern. Where a link is opened should be handled by the element it clicks on, for example, <a target="_blank">.

hotkey/src/utils.ts

Lines 16 to 22 in 0691586

export function fireDeterminedAction(el: HTMLElement): void {
if (isFormField(el)) {
el.focus()
} else {
el.click()
}
}

commented

Thank you very much for your reply!