{"id":22305699,"url":"https://github.com/muratgozel/readometer","last_synced_at":"2025-08-19T06:34:38.132Z","repository":{"id":42934073,"uuid":"237179287","full_name":"muratgozel/readometer","owner":"muratgozel","description":"The correct reading progress measurer.","archived":false,"fork":false,"pushed_at":"2023-01-06T02:29:46.000Z","size":1603,"stargazers_count":2,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T00:46:31.094Z","etag":null,"topics":["read-time","reading-progress","reading-time"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muratgozel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"muratgozel","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-01-30T09:26:25.000Z","updated_at":"2020-05-04T11:35:44.000Z","dependencies_parsed_at":"2023-02-05T03:00:33.319Z","dependency_job_id":null,"html_url":"https://github.com/muratgozel/readometer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/muratgozel/readometer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratgozel%2Freadometer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratgozel%2Freadometer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratgozel%2Freadometer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratgozel%2Freadometer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muratgozel","download_url":"https://codeload.github.com/muratgozel/readometer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muratgozel%2Freadometer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271113464,"owners_count":24701609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["read-time","reading-progress","reading-time"],"created_at":"2024-12-03T19:12:49.159Z","updated_at":"2025-08-19T06:34:38.107Z","avatar_url":"https://github.com/muratgozel.png","language":"JavaScript","funding_links":["https://ko-fi.com/muratgozel","https://ko-fi.com/F1F1RFO7"],"categories":[],"sub_categories":[],"readme":"# Readometer\nThe correct reading progress measurer.\n\n![NPM](https://img.shields.io/npm/l/readometer)\n[![npm version](https://badge.fury.io/js/readometer.svg)](https://badge.fury.io/js/readometer)\n![npm bundle size](https://img.shields.io/bundlephobia/min/readometer)\n![npm](https://img.shields.io/npm/dy/readometer)\n\nUses a combination of **time spent on the dom element** and **scroll points** to track the reading progress of the user. Spent time, effects the reading progress based on average reading speed and language of the text.\n\n## Install\n```sh\nnpm i readometer\n```\n\n## Import\nThere are different types of distributions depending on your use case. Essentially, the package can be imported via require:\n\n```js\nconst kit = require('readometer')\n```\n\nor via script tag:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://unpkg.com/basekits@1/dist/basekits.iife.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"https://unpkg.com/event-emitter-object@1/dist/event-emitter-object.iife.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"https://unpkg.com/visibility-state-listener@1/dist/visibility-state-listener.iife.js\"\u003e\u003c/script\u003e\n\n\u003cscript src=\"https://unpkg.com/readometer@1/dist/readometer.iife.js\" crossorigin type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\n## Use\nThe library needs a DOM element and language of the text inside that DOM element:\n```js\nconst meter = new Readometer()\nmeter.on('progress', function(progress) {\n  console.log('User read ' + progress + ' percent of the text.')\n})\nmeter.start( document.getElementById('sample1'), 'en' )\n```\n\n## Algorithm\nBasically there are two parameters that measure the progress of reading. **The average reading speed by language** and **the size of the scrollable area**.\n\nThe library creates a target reading time according to the number of words inside DOM element, language of the text, and average reading speed. Then it checks if the DOM element has a scroll and creates scroll points according to the visible area of the DOM element. Those points must be passed by user by scrolling in order to progress reading.\n\nA simple event emitter integrated to the library therefore you can listen for reading progress from 0 to 100.\n\nThere is also a visiblityState listener inside the library which excludes the time of reading when the browser tab is not active. ([Read more about visibilityState API](https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState))\n\nChoose a text-only DOM element for more precise results.\n\n## Tests\nSee tests folder for example cases.\n\n## Notes\nAverage reading speeds by language are taken from:\n\n[https://www.irisreading.com/average-reading-speed-in-various-languages/](https://www.irisreading.com/average-reading-speed-in-various-languages/)\n\n---\n\n## Distributions Report\nThis is an auto-generated report that shows the type, name and size of the bundles available to use individually.\n\n[comment]: # (DISTRIBUTIONS_REPORT_START)\n```js\n[\n  \"readometer.amd.js (3.63 KB)\",\n  \"readometer.amd.polyfilled.js (20.40 KB)\",\n  \"readometer.cjs.js (3.58 KB)\",\n  \"readometer.cjs.polyfilled.js (20.36 KB)\",\n  \"readometer.es.js (3.51 KB)\",\n  \"readometer.es.polyfilled.js (20.30 KB)\",\n  \"readometer.iife.js (3.62 KB)\",\n  \"readometer.iife.polyfilled.js (20.39 KB)\",\n  \"readometer.umd.js (3.93 KB)\",\n  \"readometer.umd.polyfilled.js (20.71 KB)\"\n]\n```\n[comment]: # (DISTRIBUTIONS_REPORT_END)\n\n## Babel Polyfills Report\nThis is an auto-generated report that shows the pollyfils added by core-js to the **pollyfilled** distributions based on the targets configuration described below.\n\n[comment]: # (BABEL_POLYFILLS_REPORT_START)\n```js\n// polyfills:\n[\n  \"es.symbol\",\n  \"es.symbol.description\",\n  \"es.symbol.iterator\",\n  \"es.array.iterator\",\n  \"es.object.get-prototype-of\",\n  \"es.object.set-prototype-of\",\n  \"es.object.to-string\",\n  \"es.reflect.construct\",\n  \"es.regexp.to-string\",\n  \"es.string.iterator\",\n  \"web.dom-collections.iterator\",\n  \"es.array.concat\",\n  \"es.array.filter\",\n  \"es.number.constructor\",\n  \"es.number.parse-float\",\n  \"es.regexp.exec\",\n  \"es.string.split\",\n  \"web.timers\"\n]\n// based on the targets:\n{\n  \"android\": \"4.4.3\",\n  \"chrome\": \"49\",\n  \"edge\": \"17\",\n  \"firefox\": \"52\",\n  \"ie\": \"9\",\n  \"ios\": \"9.3\",\n  \"opera\": \"66\",\n  \"safari\": \"11.1\",\n  \"samsung\": \"4\"\n}\n```\n[comment]: # (BABEL_POLYFILLS_REPORT_END)\n\nThanks for watching 🐬\n\n[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F1RFO7)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuratgozel%2Freadometer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuratgozel%2Freadometer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuratgozel%2Freadometer/lists"}