-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
a sound operation on the variants of LinkHints.activate #340
Comments
There's no way to detect whether a website will open a new tab or not. And more importantly, a web page itself can also dynamically decide whether to open a tab, in its javascript code.
The head-up-display is only a indicator about how Vimium C sends click events to webpages, but not a promise for the final result.
…---Original---
From: ***@***.***>
Date: Wed, May 5, 2021 18:42 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [gdh1995/vimium-c] a sound operation on the variants of LinkHints.activate (#340)
Currently, LinkHints.activate's several variants, including:
1. LinkHints.activateModeWithQueue,
2. LinkHints.activateModeToOpenInNewForegroundTab,
3. LinkHints.activateModeToOpenInNewTab,
have their own unique distinguishing characteristics, and those characteristics can mix into new compound commands through the combination of Ctrl Shift or Alt. But in facing some webs' own inclinations, like whether open pages in new tabs or not, the above commands have inconsistent behavior with their HUDs on different pages. For example, there's no command indeed that can open a new page in the current tab if the web would open it in the new tab, but the HUD of LinkHints.activate says it can.
So I combed through the behaviors about opening pages and clicking, concluding the table below:
Trigger JS / Open Page | In the New/Current Tab | To New Foreground Tab | With Queue | Trigger (inclination dependent)
Open Page New √ √ Ctrl + Alt
Open Page New √ Ctrl
Open Page New √ Alt
Open Page New Default / Shift
Open Page Current Default / ×
Trigger JS* Current Default
Trigger JS Current √ Alt
* Actually, this behavior is the same as the 4th, the 2nd, and the 5th, namely clicking once.
I suggest a new parameter of LinkHints.activate to identify the users' inclination about whether open a page in the new or current tab, Ctrl to whether to new foreground tab or not, Shift to users' inclination with the opposition, and Alt to stay unchanged.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
No, you don't have to detect that. I mean you can neglect webs' inclination and unify the behavior on different pages. |
I cannot force those web page "buttons which want to open a new table" to open in a current table. Although for normal links, we are indeed able to open new tabs because we can read the href attribute.
If you do want to open in new tabs, You may use `newtab="force"`.
As for your other expectation, there's no method - Please remember, a web page can use JavaScript to do whatever it want, including changing how to open anchors, click buttons or even click a div.
…---Original---
From: ***@***.***>
Date: Wed, May 5, 2021 18:59 PM
To: ***@***.***>;
Cc: "Dahan ***@***.******@***.***>;
Subject: Re: [gdh1995/vimium-c] a sound operation on the variants of LinkHints.activate (#340)
No, you don't have to detect that. I mean you can neglect webs' inclination and unify the behavior on different pages.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Um using the same logic, it seems possible to
force vimium c to open a URL in a current tab - of course it can only be executed on an anchor. I may add an option to do so.
If you want a mode which overrides logic on anchors and still follow ctrl / shift / alt keys, Then there's indeed no such an option.
But I'm still doubting whether this option is useful for any other user.
…---Original---
From: ***@***.***>
Date: Wed, May 5, 2021 18:59 PM
To: ***@***.***>;
Cc: "Dahan ***@***.******@***.***>;
Subject: Re: [gdh1995/vimium-c] a sound operation on the variants of LinkHints.activate (#340)
No, you don't have to detect that. I mean you can neglect webs' inclination and unify the behavior on different pages.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Although I separate the behaviors into Trigger JS and Open Page, I recognize that they are not exhaustive. You may see the former as any clicking event other than Open Page, as far as Vimium-C can simulate.
I think to some extent forcing Vimium-C to open a URL in a current tab and forcing the webpage to do so are just different descriptions of one thing, because they have identical results.
That's the key, which fixes up the drawback where the cross in the table lies. |
not a same thing. if you force Vimium C to open an anchor in a current page, then it won't dispatch any "click" event to web pages.
…---Original---
From: ***@***.***>
Date: Wed, May 5, 2021 22:38 PM
To: ***@***.***>;
Cc: "Dahan ***@***.******@***.***>;
Subject: Re: [gdh1995/vimium-c] a sound operation on the variants of LinkHints.activate (#340)
Please remember, a web page can use JavaScript to do whatever it want
Although I separate the behaviors into Trigger JS and Open Page, I recognize that they are not exhaustive. You may see the former as any clicking event other than Open Page, as far as Vimium-C can simulate.
I cannot force those web page "buttons which want to open a new table" to open in a current table.
it seems possible to force vimium c to open a URL in a current tab
I think to some extent forcing Vimium-C to open a URL in a current tab and forcing the webpage to do so are just different descriptions of one thing, because they have identical results.
I may add an option to do so.
That's the key, which fixes up the drawback where the cross in the table lies.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
What's "dispatch"? |
"click an element" means dispatching "click" event (and some other events) to the page, with "target=the element". Usually a page will do some actions on the click event.
Before a click event, there are mousedown and mouseup events on the same target. if a page doesn't receive any click event, it may do nothing, bcause most pages won't deal with mousedown specially.
…---Original---
From: ***@***.***>
Date: Thu, May 6, 2021 01:33 AM
To: ***@***.***>;
Cc: "Dahan ***@***.******@***.***>;
Subject: Re: [gdh1995/vimium-c] a sound operation on the variants of LinkHints.activate (#340)
What's "dispatch"?
Is that replacing the URL-1 with URL-2 by immediately click it after URL-1?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks to your explanation, I understand that the behavior of the web is exclusively up to its designer. |
Hello. v1.90.0+ has support For any non-anchor element, You may use the trick in https://github.com/gdh1995/vimium-c/wiki/Map-a-key-to-different-commands-on-different-websites to limit the scope of |
Currently,
LinkHints.activate
's several variants, including:have their own unique distinguishing characteristics, and those characteristics can blend into new compound commands through the combination of
Ctrl
Shift
orAlt
. But in facing some webs' own inclinations, like whether open pages in new tabs or not, the above commands have inconsistent behavior with their HUDs on different pages. For example, there's no command indeed that can open a new page in the current tab if the web would open it in the new tab, but the HUD ofLinkHints.activate
says it can.So I combed through the behaviors about opening pages and clicking, concluding the table below:
* Actually, this behavior is the same as the 4th and the 5th, namely clicking once.
I suggest a new parameter of
LinkHints.activate
to identify the users' inclination about whether to open a page in the new or current tab,Ctrl
to toggle between whether to new foreground tab or not,Shift
to toggle between the users' inclination and the opposite, andAlt
to stay unchanged.The text was updated successfully, but these errors were encountered: