1

阅读器

 2 years ago
source link: https://www.v2ex.com/t/794186
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  JavaScript

请问大佬 rss 阅读器的滚动向下 自动标记链接为已访问 这个功能大致应该如何实现 在网上搜索了几天 没啥满意的结果

  senggai · 1 天前 · 1234 次点击
2 条回复    2021-08-07 09:41:48 +08:00

seakingii   1 天前

监听下 scroll 事件?

delectate   1 天前

搜索方向是错误的。找不到结果。

监听 scroll 事件没错,还要根据位置和 id 判断这个 div 的状态(未读 /阅读中 /已经阅读 /已经阅读后标记为未读 /删除 /删除后恢复 /彻底删除 /星标 /星标已经取消),并将状态变化实时 post 到服务器;如果 scroll up,还要根据服务器下发的数据重新渲染。

这方面可以看一下瀑布流的实现,或者开源阅读器的实现( newsblur 、tinytinyrss ),或者开源邮箱的前端等等。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK