OBKoro1 / stop-mess-around

自律chrome浏览器插件:帮助你戒掉上班/学习期间下意识的在浏览器打开知乎等网站的习惯,往往一看就是几个小时过去了,插件会自动检测摸鱼网站, 提示激励信息后, 关闭摸鱼网站。
MIT License
341 stars 20 forks source link

[Bug] “停止休息”按钮不起作用 #17

Closed YalandHong closed 2 years ago

YalandHong commented 2 years ago

描述bug(必填)

“停止休息”按钮不起作用,点击没有任何反应

复现方式(必填)

随便开个网页,点击“休息一下”,随便设个时间,点击确定。然后点击右下角计时器里的“停止休息”

预期行为

关闭当前网页

当前行为

没有任何反应

插件设置(不是必现的bug,需要必填)

从Chrome商店新装的插件,没有更改任何配置。

反馈问题数据:

{
  "setting": {
    "log": false,
    "open": true,
    "time": 2,
    "jump": false,
    "jumpUrl": "https://leetcode-cn.com/problemset/all/",
    "checkoutStudy": 30,
    "sponsorshipTime": 1667634650646,
    "defaultList": [
      {
        "site": "douyu.com",
        "labelName": "斗鱼直播",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "www.huya.com",
        "labelName": "虎牙直播",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "https://juejin.cn/pins",
        "labelName": "掘金沸点",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "https://www.zhihu.com/",
        "labelName": "知乎首页",
        "matchRule": "strict",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "https://www.zhihu.com/hot",
        "labelName": "知乎热榜",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "bilibili.com",
        "labelName": "B站",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "weibo.com",
        "labelName": "微博",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "v2ex.com",
        "labelName": "V2ex论坛",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "qq.com",
        "labelName": "企鹅直播",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "taobao.com",
        "labelName": "淘宝网",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "jd.com",
        "labelName": "京东",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "hupu.com",
        "labelName": "虎扑",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "top.baidu.com",
        "labelName": "百度热搜",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "qidian.com",
        "labelName": "起点小说网",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      },
      {
        "site": "mo.fish",
        "labelName": "鱼塘热榜",
        "matchRule": "includes",
        "jump": false,
        "jumpUrl": "https://leetcode-cn.com/problemset/all/",
        "open": true,
        "closeTime": 0,
        "globalSiteTouchFish": false,
        "restTime": 0,
        "siteType": "default"
      }
    ],
    "titleArr": [
      "日拱一卒,功不唐捐",
      "积累的力量",
      "愚公移山的坚持",
      "笨鸟先飞的觉悟",
      "聚焦目标",
      "千里之行,始于足下",
      "天道酬勤",
      "不经历风雨,怎能见彩虹?",
      "不经一番寒彻骨,怎得梅花扑鼻香?",
      "玉不琢,不成器",
      "日积月累, 水滴石穿",
      "没有所谓的天才"
    ],
    "confirmArr": [
      "日拱一卒",
      "关闭页面",
      "日积月累"
    ],
    "matchRule": "includes",
    "tipArr": [
      "刻意练习的四要素,定义明确的目标,极度的专注,有效的反馈,在拉伸区练习。",
      "最好是形成一个知识体系,需要自己沉淀出思维框架,可以逐步提高快速的学习与解决问题的能力",
      "识别高收益,长半衰期的知识。不断加深自己的核心竞争力和不可替代性。",
      "专注的力量非常重要, 选择合适的目标,有所为,有所不为.\n巴菲特的双目标清单: \n巴菲特让朋友圈出职业生涯最重要的20个目标,然后又让他圈出最重要的五个目标。然后告诉他要全力去做五个目标,像躲避瘟疫一样去躲避另外的十五个目标。",
      "有时候你需要适当休息, 试试番茄工作法,太过用力容易导致自我损伤,如果你太过强迫自己去做某件事,就会不断内耗很难长久的坚持下去。",
      "如果想要在某个领域做的出色,就必须对它有强烈的兴趣",
      "模仿最优秀人的人生哲学,你也会更容易接近成功",
      "不要让闲扯淡的人,打扰到做正事的人。",
      "多做重要而不紧急的事情, 合理规划时间成为一个从容的人。",
      "一个人时间用在哪儿,成就就在哪儿。",
      "用进废退: 只有练习才能精进,对于技能树的点击要有所取舍",
      "目标要定在月亮之上,\n即使失败,\n也可以落在众星之间。",
      "目标感非常重要,理清你做事情的方法和路径,为了什么东西去努力。",
      "人们总会高估自己短期的能力,而低估自己长期的能力。",
      "或许每个优秀的人,都有一段沉默的时光。\n在这段时光里付出了很多努力,却得不到想要的结果。\n我们把它叫做扎根。",
      "自古以来学有建树的人,都离不开一个“苦”字。",
      "我从来不认为半小时是微不足道的一段时间 - 达尔文",
      "留下来的经典书籍都是最优秀的人的智慧结晶,想想自己何德何能能与世界最聪明最优秀的人聊天学习,读书就是让你可以轻易的与他们聊天学习,这就是所谓的站在巨人的肩膀上.",
      "读书能让人以最低的成本,去培养眼界和格局。",
      "习惯的力量,好的习惯事半功倍,坏的习惯纠正起来非常难",
      "一身行囊离开的时候,除了一些积蓄,\n就是你的经历,你的态度,你的身体,还有,你的技术。",
      "人在生活中可能会遭到沉重的打击,每一次不幸都是吸取教训的良机。",
      "真正的成功只有一种,那就是按照自己的方式度过一生",
      "人生是一场马拉松, 一个人一辈子,只要做好一件事就可以了",
      "每天都做那件有意义的事,做的天数多了,人生就有意义了。",
      "不怕苦,苦半辈子;\n怕苦,苦一辈子。",
      "失败只有一种,那就是放弃努力, 半途而废。",
      "种一棵树最好的时间是在十年前, \n其次就是现在了。",
      "能不能实现目标,取决于你有多想实现它",
      "心流状态:\n心流是一种将大脑毫不费力的集中起来的状态,这种状态下可以使人忘却时间的概念, 这是一种极度专注的状态。",
      "不吃读书的苦,你就要吃生活的苦,读书是为了让你少吃苦。",
      "你总觉得还有时间,这就是问题所在。",
      "各行各业最优秀的人才每一个都拥有持续阅读,持续学习的习惯,这才是成功的秘诀。",
      "获得某件你想要的东西,最可靠的方法是让自己配得上他。",
      "生活由许许多多小的选择组成,\n每个选择都倾向于舒服的,\n最终将一事无成。",
      "25~35岁,是每个人最宝贵的时光,应该用在刀刃上。",
      "坚持做自己懒得做但正确的事情,\n就能得到别人想得到却得不到的东西。",
      "要想翻过一堵墙,最好的办法是先把帽子扔过去。",
      "学历代表过去、能力代表现在、学习力代表未来。",
      "三延四拖,你就是时间的小偷。",
      "胜利者往往是以坚持最后五分钟的时间中得来成功 - 牛顿",
      "明日复明日,明日何其多。\n日日传明日,万事成蹉跎。\n世人皆被明日累,明日无穷老将至。\n晨昏滚滚水东流,今古悠悠日西坠。\n百年明日能几何,请君听我明日歌。",
      "百金买骏马,\n千金买美人,\n万金买高爵,\n何处买青春?\n",
      "花有重开日,人无再少年。",
      "泰山不让土壤,故能成其大;\n江海不择细流,故能就其深。",
      "九层之台,起于累土。",
      "不问收获,但问耕耘,天道酬勤!",
      "忙于采集的蜜蜂,无暇在人前高谈阔论。",
      "一寸光阴一寸金,寸金难买寸光阴。",
      "勤奋的人是时间的主人,懒惰的人是时间的奴隶。",
      "黑发不知勤学早,白首方悔读书迟。",
      "形成天才的决定因素应该是勤奋。",
      "少壮不努力,老大徒伤悲。",
      "勤奋和智慧是双胞胎,懒惰和愚蠢是亲兄弟。",
      "天行健,君子以自强不息。",
      "玉不琢,不成器;\n木不雕,不成材;\n人不学,不知理。",
      "不经一番寒彻骨,怎得梅花扑鼻香?",
      "笨鸟先飞的觉悟, 愚公移山的坚持。",
      "不积跬步,无以至千里;不积小流,无以成江海。",
      "合抱之木,生于毫末;\n百丈之台,起于累土;\n千里之行,始于足下。",
      "再长的路,一步步也能走完。\n再短的路,不迈开双脚也无法到达。",
      "宝剑锋从磨砺出   梅花香自苦寒来",
      "日日行,不怕千万里;常常做,不怕千万事。",
      "路漫漫其修道远,吾将上下而求索。",
      "质变都来自于量变的积累",
      "书山有路勤为径,学海无涯苦作舟。",
      "世上无难事,只要肯登攀。",
      "勤能补拙是良训,一分耕耘一分才。",
      "不经历风雨,怎能见彩虹?",
      "业精于勤而荒于嬉,行成于思而毁于随。"
    ],
    "addSite": "",
    "todayGlobalTouchFish": 1667635305039,
    "defaultNum": {
      "defaultList": 15,
      "titleArr": 12,
      "confirmArr": 3,
      "tipArr": 70
    },
    "showRightTip": "open",
    "lookCode": "open",
    "restTime": 0,
    "globalSiteTouchFish": false,
    "closeTime": 0,
    "siteType": "default",
    "init": true,
    "version": "2.1.0",
    "matchClosePage": 15,
    "versionUpdate": true
  },
  "statisticsTime": [
    {
      "time": 8,
      "restSite": [
        {
          "time": 8,
          "restBtnClick": [
            {
              "time": 5,
              "count": 3
            }
          ],
          "labelName": "京东",
          "site": "jd.com"
        }
      ],
      "date": "2022-11-05"
    }
  ],
  "listArr": [
    {
      "site": "weibo.com",
      "labelName": "微博",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "taobao.com",
      "labelName": "淘宝网",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "qidian.com",
      "labelName": "起点小说网",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "https://www.zhihu.com/",
      "labelName": "知乎首页",
      "matchRule": "strict",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "www.huya.com",
      "labelName": "虎牙直播",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "https://juejin.cn/pins",
      "labelName": "掘金沸点",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "v2ex.com",
      "labelName": "V2ex论坛",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "https://www.zhihu.com/hot",
      "labelName": "知乎热榜",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "jd.com",
      "labelName": "京东",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": false,
      "closeTime": 1667635005039,
      "globalSiteTouchFish": false,
      "restTime": 5,
      "siteType": "default"
    },
    {
      "site": "bilibili.com",
      "labelName": "B站",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "douyu.com",
      "labelName": "斗鱼直播",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "hupu.com",
      "labelName": "虎扑",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "mo.fish",
      "labelName": "鱼塘热榜",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    },
    {
      "site": "top.baidu.com",
      "labelName": "百度热搜",
      "matchRule": "includes",
      "jump": false,
      "jumpUrl": "https://leetcode-cn.com/problemset/all/",
      "open": true,
      "closeTime": 0,
      "globalSiteTouchFish": false,
      "restTime": 0,
      "siteType": "default"
    }
  ]
}
YalandHong commented 2 years ago

以京东(jd.com)为例:

https://user-images.githubusercontent.com/52960068/200110288-5ff5a862-4949-4554-adbd-886ad8fe334d.mp4

hhl-web commented 2 years ago

插件已发布,等审核通过之后再通知更新插件哈~~

hhl-web commented 2 years ago

哈喽~~这个问题已解决,更新Chrome插件哈~~ 如果觉得插件还不错,就点个Star吧~❤️