{"id":22367809,"url":"https://github.com/mystroken/s","last_synced_at":"2025-07-17T03:31:45.391Z","repository":{"id":57128989,"uuid":"204487077","full_name":"mystroken/s","owner":"mystroken","description":"A custom scroll event library. Vanilla JS - No dependencies. ","archived":false,"fork":false,"pushed_at":"2020-06-20T18:47:18.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T00:42:47.162Z","etag":null,"topics":["custom-scroll","scroll"],"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/mystroken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-26T13:57:25.000Z","updated_at":"2022-11-03T04:19:39.000Z","dependencies_parsed_at":"2022-08-31T17:22:48.986Z","dependency_job_id":null,"html_url":"https://github.com/mystroken/s","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mystroken/s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mystroken%2Fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mystroken%2Fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mystroken%2Fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mystroken%2Fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mystroken","download_url":"https://codeload.github.com/mystroken/s/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mystroken%2Fs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265562995,"owners_count":23788624,"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":["custom-scroll","scroll"],"created_at":"2024-12-04T18:21:28.741Z","updated_at":"2025-07-17T03:31:45.348Z","avatar_url":"https://github.com/mystroken.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :surfer: S\n\n\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/@mystroken/s)\n![npm](https://img.shields.io/npm/dw/@mystroken/s)\n![npm](https://img.shields.io/npm/v/@mystroken/s)\n![GitHub last commit](https://img.shields.io/github/last-commit/mystroken/s)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mystroken/s/issues)\n\n\u003e S is a JavaScript library that allows you to implement custom scroll events.\u003cbr\u003eThis is a fork of Bartek Drozdz [VirtualScroll util](http://www.everyday3d.com/blog/index.php/2014/08/18/smooth-scrolling-with-virtualscroll/) and weighs ~1.5KB (minified and compressed).\n\n\u003cbr\u003e\n\n### :tada: Goals of the fork\n- Easier to add in a CommonJS environment\n- Enable to create several distinct instances by using a prototype rather than a singleton\n\n\u003cbr\u003e\n\n## Installation\n\n```bash\nnpm install @mystroken/s\n```\n\n## Usage \u0026 API\n\n- `new S(options)`\nReturn a new instance of S. See the options below.\n\n- `instance.on(fn)`\nListen to the scroll event using the specified function (fn).\n\n- `instance.off(fn)`\nRemove the listener.\n\n- `instance.destroy()`\nWill remove all events and unbind the DOM listeners.\n\n## Options\n- **el**: the target element for mobile touch events. *Defaults to window.*\n- **mouseMultiplier**: General multiplier for all mousewheel (including Firefox). *Default to 1.*\n- **touchMultiplier**: Mutiply the touch action by this modifier to make scroll faster than finger movement. *Defaults to 2.*\n- **firefoxMultiplier**: Firefox on Windows needs a boost, since scrolling is very slow. *Defaults to 15.*\n- **keyStep**: How many pixels to move with each key press. *Defaults to 120.*\n- **preventTouch**: If true, automatically call e.preventDefault on touchMove. Defaults to false.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmystroken%2Fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmystroken%2Fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmystroken%2Fs/lists"}