体检过后,写了个插件在 chrome 里养小黄鸭提醒自己喝水=w=

2018-10-18 10:10:16 +08:00
 sologgfun

感觉工作之后写代码经常忘记喝水,而且我本身因为以前经常不吃早饭,有点胆结石,医生也提醒说要多喝水多运动,但是写代码集中精神之后就经常忘记了。。

前段时间公司体检后发现颈椎有点前倾,明明才刚毕业几个月,,大家一起注意身体健康吧!下面是插件的详细内容~

干杯!妈妈再也不担心我不喝水了!

年轻人的第一个 chrome 插件! 关注大家的身体健康; rua!!!

主要功能:

①通过标签提醒距离上次喝水已经过了多久

②点击右上角刷新时间

③点击太阳切换白昼 /黑夜暂停时间

④60 分钟会提示并且标签会变色

(其实这个是一个养成类的游戏,小鸭子喝水会变大,不及时喝水会变小。哈哈哈哈哈哈 (感谢小朋友🐏医生)

The first chrome plugin for young people! Teach young people write plugins at the same time; Pay attention to your health; Rua!!!

The main function: ①Through the badge to remind you how long it has been since drinking the last time ②click the top right corner to refresh the countdown ③click the sun to switch to the day/night to pause time losing ④every 60 minutes will prompt at once and the label will change color

(In fact, this is a game , the ducklings will get bigger when you drink water and refresh, and they will get smaller if they don ’ t drink in time. Hahahahahaha (Thanks to doctors 🐏 - the one I love!❤)

chrome 插件地址: https://chrome.google.com/webstore/search/%E5%B9%B2%E6%9D%AF?hl=zh-CN

github 地址:https://github.com/sologgfun/drinkNow

9282 次点击
所在节点    分享创造
73 条回复
jswh
2018-10-18 10:12:23 +08:00
可爱
vtwoextb
2018-10-18 10:13:10 +08:00
misaka19000
2018-10-18 10:13:28 +08:00
资瓷~
luoway
2018-10-18 10:15:31 +08:00
想云养猫
qianfeilong
2018-10-18 10:44:41 +08:00
这个有意思啊😊
sologgfun
2018-10-18 10:44:47 +08:00
@jswh
@vtwoextb
@misaka19000
@luoway
生活已经如此苦逼 来点可爱的小东西调节一下 hh 我桌上就放了一只小黄鸭=w=
xspippo
2018-10-18 10:46:07 +08:00
棒棒的
43QYK2JU
2018-10-18 10:53:48 +08:00
最近每天喝 3~4.5L 水,不用提醒……就是渴的……

明天去体检下,怕不是糖尿病
zwpaper
2018-10-18 10:54:29 +08:00
非常需要一个重置按钮。。。
zwpaper
2018-10-18 10:56:13 +08:00
另外,是否来一个 Count,记录喝了几杯呢,光看小鸭子也不知道喝了多少。。。
jin5354
2018-10-18 10:57:02 +08:00
lz 是建丰吗
sologgfun
2018-10-18 10:57:35 +08:00
@zwpaper 很有道理,,我晚点更新一下 hh
sologgfun
2018-10-18 10:58:17 +08:00
@jin5354 .............................................................
cy97cool
2018-10-18 11:23:04 +08:00
不了解 chrome 应用的权限机制 但是我还是想问为啥需要所有网站的权限
https://github.com/sologgfun/drinkNow/blob/master/manifest.json 里面权限部分
"http://*/*",
"https://*/*"
Ponze
2018-10-18 11:28:55 +08:00
建丰,优秀。
sologgfun
2018-10-18 11:44:24 +08:00
@cy97cool background 和 popup 中无法直接访问页面 DOM,这个 pop 页的高宽原本做了和页面大小的适配,通过 chrome.tabs.executeScript 来执行脚本,从而实现访问 web 页面的 DOM。(不过后来我换了一种方法,用 content-scripts 进行获取了---所以这个权限是可以删掉的---晚点我检查一下代码 3q !
luoway
2018-10-18 12:12:53 +08:00
Mac
2018-10-18 12:16:00 +08:00
不喝水不是因为忘记喝水,是因为我懒的起身倒水
luoway
2018-10-18 12:16:40 +08:00
Weny
2018-10-18 12:18:19 +08:00
建丰 才华横溢 而且 帅

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/498676

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX