4 ms·
This is what reddit does, but that has its own problems: How do I ctrl+f the whole content? What if I refresh? What if I don't have JS? I haven't seen an elegan
by SippinLean 10y ago
This is what reddit does, but that has its own problems: How do I ctrl+f the whole content? What if I refresh? What if I don't have JS? I haven't seen an elegant solution yet.
- pmontra 10y agoI guess that the noscript behaviour should be to present the "More" link and let the user click it to load a new page. Exactly what we have now. The JS in the page should attach an event to the link to append the new page at the bottom. Better: it should do it automatically when the scroll position is close enough to the end. Bonus: the script should add a search box to search even in the content not yet in the page. I googled if it's possible to intercept CTRL-F and handle it programmatically. It seems it is [1] but I don't know if I would do it: the user could be surprised to find a search box in a non standard position with a non standard behaviour. It reminds me of scrollbar hijacking. [1] http://stackoverflow.com/questions/9159322/overriding-the-browsers-ctrlf-and-replace-it-with-silverlight-custom-search http://stackoverflow.com/questions/9159322/overriding-the-br...
- Raphmedia 10y agoThis opinion is never popular because for some reason developers seem to be dead afraid of asking their user's output. What I would do is add a dialog the first time the user press CTRL+F. Asks if the user wants the default or the override. Save this in a cookie or in the database.
- SippinLean 10y ago"ctrl-f" was overly literal, I simply meant "a way to search the content of all the comments." A simple (non-JS) "Search these comments" form would suffice, but I've never seen it implemented.
- joshka 10y agoAlternatively, you could load all the threads when responding to ctrl+F for the first time on a page and just leave the browser default find UX alone.