{"id":20064631,"url":"https://github.com/kinolag/scroll_handler","last_synced_at":"2025-03-02T10:41:56.325Z","repository":{"id":254112771,"uuid":"845423034","full_name":"kinolag/scroll_handler","owner":"kinolag","description":"Handle scroll events with plain JS","archived":false,"fork":false,"pushed_at":"2024-10-01T15:58:39.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T22:46:30.816Z","etag":null,"topics":["events","plain-javascript","scroll"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kinolag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T08:13:24.000Z","updated_at":"2024-10-01T15:58:42.000Z","dependencies_parsed_at":"2024-11-13T13:47:25.961Z","dependency_job_id":"9f502b25-8430-48b2-8c2d-5c35c17b2928","html_url":"https://github.com/kinolag/scroll_handler","commit_stats":null,"previous_names":["kinolag/scroll_handler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinolag%2Fscroll_handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinolag%2Fscroll_handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinolag%2Fscroll_handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinolag%2Fscroll_handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kinolag","download_url":"https://codeload.github.com/kinolag/scroll_handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241494142,"owners_count":19971870,"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","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":["events","plain-javascript","scroll"],"created_at":"2024-11-13T13:47:13.360Z","updated_at":"2025-03-02T10:41:56.301Z","avatar_url":"https://github.com/kinolag.png","language":"JavaScript","readme":"# scroll_handler\n\n## Handle scroll events and create custom ones with plain JS\n\n- Keep track of vertical scrolling in your html files.\n\n- Dispatch a custom event when an offset threshold is reached.\n\n- Display the scroll status in the UI (conditionally).\n\n## JS functions\n\nAll functionality is implemented with plain JavaScript, HTML and CSS.\n\n`handleScroll` is the function handling the `scroll` event and creating a new event (`scrollProgress`) that is dispatched to window when the vertical offset reaches a certain threshold.\n\n`listenToProgress` is the function called by the custom event listener, which logs the event.detail to the console (or can alert the user)\n\n`handleProgressInUI` is a function (called conditionally) used to display information about the scroll status in the document.\n\n`generateText` is just a function used to populate the demo html file with enough text content to enable vertical scroll.\n\n## How to use it\n\nClone the repo and open the index.html file in a browser with JS enabled.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinolag%2Fscroll_handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkinolag%2Fscroll_handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinolag%2Fscroll_handler/lists"}