爱意满满的作品展示区。
sologgfun

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

  •  
  •   sologgfun · Oct 18, 2018 · 10991 views
    This topic created in 2945 days ago, the information mentioned may be changed or developed.

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

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

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

    年轻人的第一个 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!❤)

    day

    night

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

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

    Supplement 1  ·  Oct 18, 2018

    wiki

    duck

    附上小黄鸭对写代码有帮助的证据!(推眼镜

    和自己的小黄鸭hh 呱呱~

    希望大家喜欢嘿嘿

    Supplement 2  ·  Oct 19, 2018

    对不起大家。。我傻逼了。。计时居然真的重复了。。现在v0.0.5是30分钟就提示了!

    发布要审核。。大家请小心喝多了。。

    同时谢谢各位 v 站指出的不足 学到了!

    73 replies  •  2018-11-21 21:56:23 +08:00
    jswh
    jswh
    Oct 18, 2018❤️4
    1
    可爱
    vtwoextb
    vtwoextb
    Oct 18, 2018❤️1
    2
    牛
    misaka19000
    misaka19000
    Oct 18, 2018❤️1
    3
    资瓷~
    luoway
    luoway
    Oct 18, 2018❤️1
    4
    想云养猫
    qianfeilong
    qianfeilong
    Oct 18, 2018 via Android❤️1
    5
    这个有意思啊😊
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    6
    @jswh
    @vtwoextb
    @misaka19000
    @luoway
    生活已经如此苦逼 来点可爱的小东西调节一下 hh 我桌上就放了一只小黄鸭=w=
    xspippo
    xspippo
    Oct 18, 2018 via iPhone
    7
    棒棒的
    43QYK2JU
    43QYK2JU
    Oct 18, 2018
    8
    最近每天喝 3~4.5L 水,不用提醒……就是渴的……

    明天去体检下,怕不是糖尿病
    ikw
    ikw
    Oct 18, 2018❤️1
    9
    非常需要一个重置按钮。。。
    ikw
    ikw
    Oct 18, 2018
    10
    另外,是否来一个 Count,记录喝了几杯呢,光看小鸭子也不知道喝了多少。。。
    jin5354
    jin5354
    Oct 18, 2018❤️5
    11
    lz 是建丰吗
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    12
    @zwpaper 很有道理,,我晚点更新一下 hh
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    13
    @jin5354 .............................................................
    mYYnSmiTEQWcCwAr
    mYYnSmiTEQWcCwAr
    Oct 18, 2018
    14
    不了解 chrome 应用的权限机制 但是我还是想问为啥需要所有网站的权限
    https://github.com/sologgfun/drinkNow/blob/master/manifest.json 里面权限部分
    "http://*/*",
    "https://*/*"
    Ponze
    Ponze
    Oct 18, 2018❤️3
    15
    建丰,优秀。
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    16
    @cy97cool background 和 popup 中无法直接访问页面 DOM,这个 pop 页的高宽原本做了和页面大小的适配,通过 chrome.tabs.executeScript 来执行脚本,从而实现访问 web 页面的 DOM。(不过后来我换了一种方法,用 content-scripts 进行获取了---所以这个权限是可以删掉的---晚点我检查一下代码 3q !
    luoway
    luoway
    Oct 18, 2018
    17
    Mac
    Mac
    Oct 18, 2018 via Android
    18
    不喝水不是因为忘记喝水,是因为我懒的起身倒水
    luoway
    luoway
    Oct 18, 2018❤️2
    19
    Weny
    Weny
    Oct 18, 2018 via iPhone
    20
    建丰 才华横溢 而且 帅
    des
    des
    Oct 18, 2018 via Android
    21
    不如弄个长吸管,一直放嘴里 lol
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    22
    。。。。。。。大佬们放过我吧!😢
    jason94
    jason94
    Oct 18, 2018
    23
    腻害
    fy
    fy
    Oct 18, 2018
    24
    Rua 可还行
    inoki
    inoki
    Oct 18, 2018 via Android
    25
    赞
    lolizeppelin
    lolizeppelin
    Oct 18, 2018 via Android
    26
    哈哈哈。。我也要装
    hei1000
    hei1000
    Oct 18, 2018
    27
    创意不错,可惜现在主要用 firefox 了,有考虑写个 Firefox 插件吗
    martyartrt1
    martyartrt1
    Oct 18, 2018
    28
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    29
    @fy rua!!!
    @lolizeppelin 谢谢!
    @inoki 哈哈哈哈
    @hei1000 谢谢~周末学习一下!
    @martyartrt1 谢谢~
    感谢支持!开心 嘎嘎!
    nzd
    nzd
    Oct 18, 2018
    30
    感觉不到 60 分钟就 SOS 了。。。今天感觉水喝多了
    0915240
    0915240
    Oct 18, 2018
    31
    建丰,你如此优秀~
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    32
    @nzd 怎么会呢!小鸭子一分钟一分钟的往前跑 多喝热水!
    @0915240 同款头像 你也优秀!
    f1ren2es
    f1ren2es
    Oct 18, 2018
    33
    你好骚啊楼主
    Nathanzheng
    Nathanzheng
    Oct 18, 2018
    34
    RUA? 是小僵尸么?
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    35
    @f1ren2es 老铁你说啥呢

    @Nathanzheng 我是小火人假装的小僵尸
    loading
    loading
    Oct 18, 2018 via Android
    36
    我真的想要一只做工好的小黄鸭摆件。
    Nathanzheng
    Nathanzheng
    Oct 18, 2018
    37
    @sologgfun #35 出了刀区到处都是刀🐶
    luoway
    luoway
    Oct 18, 2018
    38

    我鸭子离家出走了?消失了!
    提示“渴死了”的时候要点两次刷新才能彻底重置,期望一次就够
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    39
    @loading 确实很可爱

    @luoway 还有这种 bug !?我紧急修复中!
    EatMi
    EatMi
    Oct 18, 2018
    40
    太好了, 很贴心, 很方便. 很可爱, 但是为啥我的弹窗点击喝水那个是无效的?
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    41
    @wykjluke 现在有效啦!刚刚更新了一版!可能要过个十几分钟,有空的时候更新一下就好!谢谢你!
    Hsinyao
    Hsinyao
    Oct 18, 2018 via iPhone
    42
    楼主小黄鸭哪里买的?
    chaoxcores
    chaoxcores
    Oct 18, 2018 via iPhone
    43
    很可爱
    dyxang
    dyxang
    Oct 18, 2018 via Android
    44
    个人建议把小黄鸭随进度条移动改成:小黄鸭随着波动的水浪而下降。
    因为小黄鸭是浮在水上的嘛。
    sologgfun
    sologgfun
    OP
    Oct 18, 2018
    45
    @Hsinyao 朋友的 mentor 从厦门回来带了很多,给了我一个,,

    @chaoxcores XD !

    @dyxang 可以考虑哈哈
    jiangwb
    jiangwb
    Oct 18, 2018
    46
    楼主,我手头上有个保温杯,杯子盖外顶部有个显示屏,
    显示杯内水温,可以设置定时,每两小时响一次来提醒喝水。我觉得你需要这个
    threee333
    threee333
    Oct 18, 2018 via Android
    47
    @jiangwb 这么厉害的吗?大概什么价位”可以给个链接吗?
    zzk819166453
    zzk819166453
    Oct 18, 2018 via Android❤️1
    48
    好有趣,感谢楼主分享👍👍👍
    oul
    oul
    Oct 19, 2018
    49
    喝水提醒的文案改成“你已经一个小时没喝水,小鸭子快渴死了!”读起来会不会更舒服点?
    myl0204
    myl0204
    Oct 19, 2018
    50
    rua!!
    haon
    haon
    Oct 19, 2018
    51
    你好骚啊
    yo0o0o0
    yo0o0o0
    Oct 19, 2018 via iPhone
    52
    肾结石患者刚需啊,谢谢楼主。(为啥我就想不到这创意呢)
    sologgfun
    sologgfun
    OP
    Oct 19, 2018
    53
    @oul 周末我再优化优化~
    @jiangwb 这么高级吗老铁
    @myl0204 rua !!
    @yo0o0o0 不谢不谢!一起多喝水!
    hubahuba
    hubahuba
    Oct 19, 2018
    54
    建丰 你是我梦想中的男人
    flyingkids
    flyingkids
    Oct 19, 2018
    55
    兄弟,我这一个小时不到,就已经提醒两次了,你那个 count++是不是写重了,导致一秒加了两秒?
    flyingkids
    flyingkids
    Oct 19, 2018
    56

    这里外面加了一次,方法里面加了一次
    geshansuiyue
    geshansuiyue
    Oct 19, 2018
    57
    一直会有后台回复:undefined
    Biwood
    Biwood
    Oct 19, 2018
    58
    想法很不错,不过用 setInterval 计时其实不准确,代码质量有待提高
    sologgfun
    sologgfun
    OP
    Oct 19, 2018
    59
    @flyingkids
    @geshansuiyue
    @Biwood
    好像是的,我改一下
    sologgfun
    sologgfun
    OP
    Oct 19, 2018
    60
    对不起大家。。我傻逼了。。居然真的重复了。。发布要审核。。大家请小心喝多了。。
    同时谢谢各位 v 站指出的不足 学到了!
    qingxiangcool
    qingxiangcool
    Oct 19, 2018
    61
    赶紧喝了杯水压压惊
    geshansuiyue
    geshansuiyue
    Oct 19, 2018
    62
    重置按钮多次快速点击会导致图像越来越大。
    geshansuiyue
    geshansuiyue
    Oct 19, 2018
    63
    不是快速 是每点击一次就变大
    sologgfun
    sologgfun
    OP
    Oct 19, 2018
    64
    @geshansuiyue 对呀,黑夜里点击就会变小了 不要玩弄它了 它还是个孩子
    wazxzd
    wazxzd
    Oct 19, 2018
    65
    什么时候更新阿= =,我看商店还是昨天的
    zdnyp
    zdnyp
    Oct 19, 2018
    66
    很厉害了喂
    sologgfun
    sologgfun
    OP
    Oct 19, 2018
    67
    @wazxzd 我已经发布了但是 chrome 要审核= = 效率好像蛮低的 辛苦小黄鸭了 一个小时跑两趟
    SpiderXiantang
    SpiderXiantang
    Oct 22, 2018
    68
    已用上 期待更新
    ddup
    ddup
    Oct 22, 2018
    69
    有意思哈哈
    frozenthrone
    frozenthrone
    Oct 23, 2018 via iPhone
    70
    可以直接在小黄鸭里放个 arduino 啊
    flyingkids
    flyingkids
    Oct 23, 2018❤️1
    71
    喜大普奔,chrome 终于审核通过了,时间正常了(话说这审核效率也忒低了)
    sologgfun
    sologgfun
    OP
    Oct 23, 2018
    72
    @flyingkids 哇 看到你留言我才知道的哈哈 效率超低
    auv1107
    auv1107
    Nov 21, 2018
    73
    哈哈 你真可爱
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1287 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 107ms · UTC 17:17 · PVG 01:17 · LAX 09:17 · JFK 12:17
    ♥ Do have faith in what you're doing.