mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Reduce the size of hinting*.ts
by adding some more lines of code
This commit is contained in:
parent
247fc05d1c
commit
a2e95035dd
1 changed files with 10 additions and 0 deletions
|
@ -659,6 +659,16 @@ function hintPageExStr(...exStr: string[]) {
|
|||
})
|
||||
}
|
||||
|
||||
async function hintPagePipe(selectors,key) {
|
||||
let hint = await new Promise(resolve => {
|
||||
hintPage(hintables(selectors, true), resolve)
|
||||
})
|
||||
return (hint as any).target[key]
|
||||
// Promise takes function which it calls immediately with another function
|
||||
// as its argument. When this second function is called, it gives its
|
||||
// argument to the promise as its value
|
||||
}
|
||||
|
||||
function hintPageTextYank() {
|
||||
hintPage(elementswithtext(), hint => {
|
||||
messageActiveTab("commandline_frame", "setClipboard", [
|
||||
|
|
Loading…
Add table
Reference in a new issue