HackerNew
HackerNew copied to clipboard
Fix Endless Scrolling
Fixes #23
Tracking testing progress. This is the current state of the patch:
Page Types
-
[x] News (Home) —
td.title a[href^="news?p="]
-
[x] Newest —
td.title a[href^="newest?next="]
-
[x] Threads
-
[x] newcomments
-
[x] Upvoted Stories (private)
-
[x] Upvoted Comments (private)
-
[ ] Favorite Comments
-
[x] Show
-
[x] Ask
-
[x] Jobs
-
[x] Show New
-
[x] Submitted
-
[x] Over
-
[x] check for any other page types I've missed
NB: Threads "above the fold" bug is probably present on all pages given the right data/screen-size
Page Types no longer used? Remove code:
- [x] My saved —
td.title a[href^="saved"]
Now called 'Favorite Stories'. See above. - [x] Threads (x) —
td.title a[href^="/x"]
Misc
- [x] is dropping the
td.title
from the selectors more performant/future-proof?
Wow, thanks! In your testing did it only load one page and then not load further pages?
On some pages yes. I'll see if I can fix that next week. On Feb 25, 2017 6:40 AM, "Tom Moor" [email protected] wrote:
Wow, thanks! In your testing did it only load one page and then not load further pages?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tommoor/HackerNew/pull/30#issuecomment-282464942, or mute the thread https://github.com/notifications/unsubscribe-auth/AADUBcy-kqwVDzmXmOpmQmwCSyiG61C2ks5rf8zhgaJpZM4MLVKJ .
Maybe we should merge this, it's much better than what's in use already
I have something that's much better. I'll try and find time to commit it tomorrow. If you don't here from me soon by all means merge. On Apr 19, 2017 4:13 AM, "Tom Moor" [email protected] wrote:
Maybe we should merge this, it's much better than what's in use already
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tommoor/HackerNew/pull/30#issuecomment-295055524, or mute the thread https://github.com/notifications/unsubscribe-auth/AADUBR_SSjs5yZXsi_cVZTapIt9IV_1lks5rxXvfgaJpZM4MLVKJ .
I've added my current version. It's much better than the live version, however, there are some issues which I've listed below. They're relatively minor apart from the ":warning:" layout one. I'll see if I can fix that but I probably won't be looking at the rest any time soon.
Untested
- [ ] Favorite Comments - Haven't found a user with >30 comments to require paging.
Known issues:
- Upvoted Comments (private)
- [ ] :warning: 2 column layout issue after page for first more link appended.
- [ ] spinner gifs aren't removed (not after a .morespace row)
-
Threads
- [ ] If More is visible above the fold on first page then endless scrolling doesn't trigger. Resizing browser to make page smaller and then scrolling down will trigger it.
-
Item / Stories
- [ ] Extra story heading inserted at bottom
-
New Comments
- [ ] spinner gifs aren't removed (not after a .morespace row)
-
Favourite Submissions
- [ ] extra "submissions | comments" links inserted
-
Show
- [ ] extra "Please read the rules. You can also browse the newest Show HNs." inserted
- Jobs
- [ ] extra "These are jobs at startups that were funded by Y Combinator. You can also get a job at a YC startup through Triplebyte." inserted
NB: I also tested the links on the lists page and couldn't find anything other the the issues above.
@SamHasler
I haven't tried this extension yet, let alone the PR, but here's a user with lots of favorite comments: https://news.ycombinator.com/favorites?id=danso (#4
author on HN according to this old list https://github.com/antontarasenko/smq/blob/master/reports/hackernews-top-authors-by-h-index.md)
I think HN has blocked me for opening too many comments pages at once, so I hope this info is useful :-/
@seanf Thanks for the test page. If the block doesn't lift try emailing [email protected]
I'm fairly sure HN changed since I made this PR (I think the selectors are simpler now). I've fixed more pages now so I'll have to update it if I find the time.