GoogleChromeLabs / link-to-text-fragment

Browser extension that allows for linking to arbitrary text fragments.
https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg
Apache License 2.0
412 stars 33 forks source link

Don't insist on Unique Text (make it an option) #37

Closed dbareis closed 3 years ago

dbareis commented 3 years ago

A lot of time I'd be happy with it working on the first match. I believe this would be the extension forcing this and not chrome which I'm guessing would go to the first match.

Maybe display the message but still copy the link in case the user is happy with this (that is make it a suggestion rather than an error).

tomayac commented 3 years ago

Scroll to Text Fragment is very much about unique links. This is not a "find on page" feature, but really meant to link to the instance of text that someone means to link to.

dbareis commented 3 years ago

Google supports it, your extension doesn't. But you wrote it, maybe when I have more time I'll fork it.

tomayac commented 3 years ago

You can get this behavior (see spec), but it's very much not in the sense of this extension.

dbareis commented 3 years ago

The behavior I suggested wouldn't change any obvious behavior (to the user) except perform the copy to clipboard anyway (which wouldn't kill anyone), I have a number of cases where I'm happy to go to the first matching search result. Either way I can work around it or fork it eventually. Thanks

dbareis commented 3 years ago

Hi,

It's your extension but I thought the sense of the app was to link to text in a html page.


Thanks Dennis

On Mon, 17 May 2021 at 17:19, Thomas Steiner @.***> wrote:

You can get this behavior (see spec https://wicg.github.io/scroll-to-text-fragment/#:~:text=the%20only%20required%20parameter%20is%20textstart.%20if%20only%20textstart%20is%20specified%2C%20the%20first%20instance%20of%20this%20exact%20text%20string%20is%20the%20target%20text.), but it's very much not in the sense of this extension.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/37#issuecomment-842074246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACICPTQIXMMHMXRMY7BFODTOC7OVANCNFSM446UNJXQ .

willlma commented 3 years ago

@tomayac would you reconsider this? I installed this extension because I enjoy the scroll to text fragment functionality in Chrome, and wanted the same in Firefox. I generated some links separately based on the spec and expected them to work. For example, this link works in Chrome but does not work in Firefox.

tomayac commented 3 years ago

I have filed https://github.com/GoogleChromeLabs/text-fragments-polyfill/issues/87 about this issue.

willlma commented 3 years ago

Thanks!