{"id":19970249,"url":"https://github.com/webdeveric/scroll-watcher","last_synced_at":"2025-10-04T04:37:04.548Z","repository":{"id":33619111,"uuid":"37271348","full_name":"webdeveric/scroll-watcher","owner":"webdeveric","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-16T16:44:22.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T04:36:59.228Z","etag":null,"topics":["scroll","scrolling","viewport"],"latest_commit_sha":null,"homepage":null,"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/webdeveric.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}},"created_at":"2015-06-11T16:00:58.000Z","updated_at":"2016-03-27T22:31:19.000Z","dependencies_parsed_at":"2022-08-07T22:15:40.346Z","dependency_job_id":null,"html_url":"https://github.com/webdeveric/scroll-watcher","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/webdeveric/scroll-watcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fscroll-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fscroll-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fscroll-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fscroll-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webdeveric","download_url":"https://codeload.github.com/webdeveric/scroll-watcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fscroll-watcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278266901,"owners_count":25958733,"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-10-04T02:00:05.491Z","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":["scroll","scrolling","viewport"],"created_at":"2024-11-13T02:53:39.211Z","updated_at":"2025-10-04T04:37:04.515Z","avatar_url":"https://github.com/webdeveric.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scroll Watcher\n\nPerform callbacks when scrolling.\n\n## Example Usage\n\n```javascript\nvar sw = new ScrollWatcher();\nvar elm = document.getElementById('some-id');\n\n// Do something like this if you want an infinite scroll feed.\nsw.add( function( sw ) {\n  if ( sw.atBottom ) {\n    console.log('You are at the bottom.');\n    // Perform AJAX here to load more content.\n  }\n});\n\n// Do something when an element enters the viewport.\nsw.add( function( sw ) {\n  if ( sw.inViewport(elm) ) {\n    // Do something here.\n\n    // You can remove the callback if you want to run this once.\n    sw.removeCurrentCallback();\n  }\n});\n\nsw.add( function( sw ) {\n  if ( someStopCondition ) {\n    // This removes the event listeners.\n    sw.stopListening();\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdeveric%2Fscroll-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdeveric%2Fscroll-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdeveric%2Fscroll-watcher/lists"}