Live data from Hacker News

Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

alfy.blog

81–90 of 145 posts

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#81
post #77

This also works perfectly in Microsoft Edge and has for a long time. Pointing this out because the post makes several references to things being exclusive to Chrome, when really it's probably just Chromium. (I'm still puzzled why so many more people choose to use a browser distributed by the world's largest ad network over one with all the same features plus a few nice add-ons, made by a software company.)

As of a few years ago, independent tests of telemetry back to Bing, immutable hardware-derived identification, and add-on security of the Edge store were not good.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#82

Programmatically what can a developer do with this? I see that there is a method and an object to see if its enabled or not. And there is a way to get the whole fragment which can be parsed. Are there methods to see whether some text in the fragment was actually highlighted or not? Are there methods to programmatically select text? Could there be a way to, for example, draw a rectangle around the highlighted section,…

Since you have access to the URL fragment in JS, you should be able to do any of that manually even if there isn't a special API to use. The easiest thing to do would be to check for this specially-crafted fragment in the URL and store it.

I think though that this is a pretty niche feature though, so it's unlikely to be a big source of data. In my experience, the median sophistication web user has discovered that the browser's Back button exists and can Open in New Tab. Bookmarks, zoom, ctrl-F are all too confusing. A feature that requires right-clicking may as well be black magic to most people.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#83
post #77

This also works perfectly in Microsoft Edge and has for a long time. Pointing this out because the post makes several references to things being exclusive to Chrome, when really it's probably just Chromium. (I'm still puzzled why so many more people choose to use a browser distributed by the world's largest ad network over one with all the same features plus a few nice add-ons, made by a software company.)

All the nerds trained their friends and family on Chrome. We did it to ourselves.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#84
post #62
post #36

It would be nice to have similar feature like this, but to highlight rectangle (instead of text) on the page to focus viewer on some specific area. I send screenshots with highlight quite often.

Pretty difficult to specify a rectangular region within reflowable content. It would need to be anchored by element edges, but if the algorithm chooses bad anchor elements or they reflow in weird ways (a layout that goes from horizontal to vertical on small screens, for instance), everything breaks.

you could try and target a div to highlight

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#86

https://www.w3.org/TR/xptr-framework/

I was thinking of that as well. I wonder what the world would look like if the whole XHTML angle would have been a success. While it certainly had its flaws, there were definitely some interesting ideas.

Besides XPointer and its precise addressing I used to be very fascinated about more generic link types. I don't remember the spec (was it XLink?) but there was one where source, target and the location where the link was specified were independent. A link could also have multiple ends.

So you could create a personal document that linked a HN comment to two different sentences in a Wikipedia page for example.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#87

Sidenote: please don't hijack CTRL+F on webpages, thanks. Sincerely, the world.

Maybe this is a hot take then, but I think most sites I've seen that do this, are surprisingly good at doing their One Job correctly such that I haven't resented it the way I resent things like overridden context menus, links that are not really links, etc.

e.g. GitHub. If I'm on a source file and I hit Ctrl-F, yes, in fact I do want to search the source code and not GitHub's UI -- and their search bar for that purpose is delightfully simple and not distractingly different than the normal search I expected to see when I hit that key.

What would make me rage throw my computer through a window would be if I hit Ctrl-F and it loaded a full-screen modal which showed a search results page of result snippets or something. So I'm impressed with the restraint shown by the front-end developers (or their "UX designer" taskmasters) in this case.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#88

Earlier quoted context omitted.

Hijacking CTRL+K sucks, too! It's the shortcut used to focus the browser search input in Firefox, but the industry has seemingly decided it's a great way to launch a command palette.

I recently implemented this, and the users loved it, though I was disappointed to hear it may have frustrated a usually silent group. I'm open to feedback! What would be a better approach? Please don’t just suggest “no custom shortcuts for any web app”—people spend 60-70% of their workday using the UI components my team maintains. While random sites hijacking shortcuts is definitely frustrating, in our case, the pros…

The "press again to fall back to the browser's key binding" solution many sites use for ^F isn't perfect, and won't work for all scenarios, but it definitely helps.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#89
post #77

This also works perfectly in Microsoft Edge and has for a long time. Pointing this out because the post makes several references to things being exclusive to Chrome, when really it's probably just Chromium. (I'm still puzzled why so many more people choose to use a browser distributed by the world's largest ad network over one with all the same features plus a few nice add-ons, made by a software company.)

As of a few years ago, independent tests of telemetry back to Bing, immutable hardware-derived identification, and add-on security of the Edge store were not good.

I guess I'm not convinced Microsoft is serious enough about monetizing my data and attention the way Google is. I'm assuming (generously, to be fair) that Microsoft mainly wants to optimize their software rather than use the data to maximize the effectiveness of their ad business, which seems hobby-level to me.

> immutable hardware-derived identification,

Is this in the telemetry data? Not in headers, right? Just curious to learn more

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#90

Earlier quoted context omitted.

Unrelated? CTRL+F is literally in the title...

And only in the title. It doesn't mention the keyboard shortcut once in the body because it's not about keyboard shortcuts, it's about "linking directly to web page content". In addition to unrelated gripes, it's generally considered bad practice to comment only based on the title.

You _know_ somebody will be thinking about hijacking CTRL+F with this.
Post reply on HN