Giter Site home page Giter Site logo

Comments (7)

Mike-B2021 avatar Mike-B2021 commented on May 25, 2024

I do not get this issue on most websites but i do on a few I use.

Can you try:

1 Go to https://www.bbc.co.uk/news
2 Choose an article and open it in the same or a new tab (shouldn't matter)
I chose a link which opened into this article https://www.bbc.co.uk/news/health-59909860
I see this (Capture 1)
Capture 1
3 Copied the link and pasted it into a word doc - see the attached "Link test" doc, Test 1 containing the link which opens into the page as expected
Scroll down the page to the required area of text, highlight an are of text, repeat the right-click and, as you say the resulting link goes to the page, NOT the text. This shows the issue you've raised

4 Repeat the above on THIS website https://theconversation.com/supply-chains-in-2022-shortages-will-continue-but-for-some-sellers-the-problem-will-be-too-much-stock-174085, again choosing an area of text.
You will find that on this website the resulting link opens at the required area of text within the page

See the attached "Link test" doc, Test 2 containing the link which opens into the area of text.
Link test.docx

I repeated the above on several sites and most behaved as required.

From all this I deduce that it is the coding of certain websites that allow / disallow "Link to Selected Text" to select certain areas, rather than a problem with the Extension itself.
Doesn't fix it but IMO, shows that it's not a problem with the actual Extension.

from link-to-text-fragment.

tomayac avatar tomayac commented on May 25, 2024

Thanks for putting together these tests. The generated links from the extension are correct. Could I ask you to file Chromium browser bugs for the ones that don't work? You can do so via new.crbug.com. Choose Blink>Scroll in the component field. Thank you!

from link-to-text-fragment.

Mike-B2021 avatar Mike-B2021 commented on May 25, 2024

@tomayac That would be very difficult as it appears to be random sites, i.e. from above "BBC News" exhibits the issue, "The Conversation" does not.
Clearly it's not random, rather it's something in how these sites are coded and as more of a "functional test" type of guy, I confess to not knowing enough about the "back end" to analyse that. Anyway, no such list can ever be complete unless the particular facet of the code is known. Would you not agree?

from link-to-text-fragment.

tomayac avatar tomayac commented on May 25, 2024

Since the BBC (probably) uses templates for their sites, a representative example of each problem would suffice. A common issue is changes on the site, either to the actual text, or the surrounding prefixes and/or suffixes that the extension uses to make the links unique.

In simplified language, if you wanted to link to a specific instance of, say, the word "the", there would need to be a way to say which "the", since there are many "the"s on a typical English page. The extension then tries to find a unique occurrence, for example, the one "the" that is immediately followed by the word "example". If this word happens to change, the whole link doesn't work anymore. In the worst case, the word happens to be a dynamically changing word that changes for almost each load. There is no way for the extension to detect this.

from link-to-text-fragment.

Mike-B2021 avatar Mike-B2021 commented on May 25, 2024

Exactly - I follow that explanation - thanks.
There may be many more examples that neither of us has yet thought of, but what you seem to be saying is this extension can never be "all things to all men" which is just how it is.

As the list will never be complete, someone would need to go through dozens of websites to get a cross-section - I am not volunteering for that task - sorry! :-)

I would respectfully suggest creating a bug that simply points at this one would be the most one could usefully do.

In reality, it would seem to me that creating a new bug is pointless; rather this issue should go into Release Notes as a warning about a limitation of the extension.

from link-to-text-fragment.

tomayac avatar tomayac commented on May 25, 2024

It's not a limitation of the extension, but of the feature per se, since it's based on live web pages and not archives. If you want to be sure a link works "forever", you can actually archive a page first, and then link to the archived version (example: https://web.archive.org/web/20220110093302/https://www.bbc.com/news/health-59909860#:~:text=is%20this%20nhs%20crisis%20really%20worse%20than%20ones%20before%3F).

from link-to-text-fragment.

Mike-B2021 avatar Mike-B2021 commented on May 25, 2024

Which would be pretty pointless for most users I suggest.

So in practical (User) terms it's a (perceived) limitation because the extension may not work as desired on live web pages, but is working as intended by the Dev.

Once again to be mentioned in Release Notes rather than considered as a bug, IMO

from link-to-text-fragment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.