• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

makaroni4/youtube_time_tracker: Chrome Extension that tracks time you spent on Y ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

makaroni4/youtube_time_tracker

开源软件地址:

https://github.com/makaroni4/youtube_time_tracker

开源编程语言:

JavaScript 84.9%

开源软件介绍:

YouTube™ Time Tracker Build Status Add to Chrome

YouTube™ Time Tracker is a Chrome Extension that tracks time you spent on YouTube. It's important to notice that it uses only local chrome.storage API to store data and it does't send data anywhere ⚠️.

YouTube™ Time Tracker screenshots

Stored data format

Although local chrome.storage allows us to store up to 5 Mb of data extension keeps its data very simple, just JSON with 8 keys for current/previous time periods:

{
  "2019": 110.2, // year
  "jan-2019": 110.2, // month
  "2-2019": 110.2, // week (0-52)
  "2019-01-13": 110.2, // today
  "2018": 10294, // previous year
  "dec-2018": 1248, // previous month
  "1-2019": 159, // previous week
  "2019-01-12": 91 // yesterday,
  "time_watched": 10404.2 // total time watched,
  "installed_at": "2019-01-01" // when extension was installed
}

Development

Use npm install to install needed packages (there are just a bunch: webpack, babel, jest and timekeeer for testing).

Then run npm start for Webpack to watch and compile JS files.

Load extension folder to chrome://extensions/ via "Load unpacked":

Loading extension in Chrome for development.

⚠️ You'll need to update extension every time you changed CSS/JS files. ⚠️ Webpack will watch JS files and compile app.js file in extension folder.

Testing

To run tests use npm test.

Tests are written with jest with a bunch of custom matchers and custom helper functions.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap