一个帮助控制摸鱼时间的小工具
資深大佬 : JustSong 5
描述
浏览器脚本定期向服务器发送你正在访问的网站的域名,服务器将你的 ip 和域名作为 key 查询哈希表,返回你已经在该网站上浪费的时间。
然后脚本会检查该时间是否超出了你预先设定好的时长,如果超出会提示你关掉网站,你也可以选择归零重新计时。
仓库地址: https://github.com/songquanpeng/browsing-reminder
需要你的浏览器已经启用了油猴脚本拓展。
配置
设置要在哪些网站上运行该脚本,例如:
// @match https://www.zhihu.com/* // @match https://www.github.com/* // @match https://*.youtube.com/* // @match https://*.bilibili.com/*
设置服务器地址,ping 的间隔以及允许摸鱼的时长:
const serverUrl = "https://ping.iamazing.cn"; const pingInterval = 60; // Unit is second. const maxMinutes = 10;
想部署自己的服务的同学请自行编译或者下载我编译好的版本(基于 Go ): https://github.com/songquanpeng/browsing-reminder
大佬有話說 (7)
)