{"id":18324771,"url":"https://github.com/mauroreisvieira/scroll-lock","last_synced_at":"2026-05-02T11:34:53.164Z","repository":{"id":113044695,"uuid":"210817899","full_name":"mauroreisvieira/scroll-lock","owner":"mauroreisvieira","description":"Lock body scroll without breaking scrolling of a target element.","archived":false,"fork":false,"pushed_at":"2019-10-01T14:21:43.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T15:16:01.727Z","etag":null,"topics":["css","eslint","javascript","prettier","rollup","scroll-lock"],"latest_commit_sha":null,"homepage":"https://mauroreisvieira.github.io/scroll-lock/","language":"HTML","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/mauroreisvieira.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-25T10:28:11.000Z","updated_at":"2019-10-01T14:21:45.000Z","dependencies_parsed_at":"2023-06-07T00:45:25.257Z","dependency_job_id":null,"html_url":"https://github.com/mauroreisvieira/scroll-lock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauroreisvieira%2Fscroll-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauroreisvieira%2Fscroll-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauroreisvieira%2Fscroll-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauroreisvieira%2Fscroll-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauroreisvieira","download_url":"https://codeload.github.com/mauroreisvieira/scroll-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055276,"owners_count":21040157,"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":["css","eslint","javascript","prettier","rollup","scroll-lock"],"created_at":"2024-11-05T18:35:46.177Z","updated_at":"2026-05-02T11:34:48.144Z","avatar_url":"https://github.com/mauroreisvieira.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scroll Lock\n\nLock body scroll without breaking scrolling of a target element (only for touch devices).\n\n## Project Setup\n\n``` bash\n# Using npm\nnpm install\n\n# Using Yarn\nyarn add\n```\n\n### Compiles and hot-reloads for development\n\n``` bash\nyarn run dev\n```\n\n### Compiles and minifies for production\n\n``` bash\nyarn run build\n```\n\n### Lints and fixes files\n\n``` bash\nyarn run lint\n```\n\n## Usage examples\n\n```js\nimport { Scrollock } from \"./scrollock.js\";\n\nconst targetElement = document.querySelector('#someElement');\nconst lock = new Scrollock({\n    element: targetElement\n});\n\nlet isOpen = false;\n\ndocument.querySelector('.btn').addEventListener('click', function() {\n    if (!isOpen) {\n        lock.disableBodyScroll();\n    } else {\n        lock.enableBodyScroll();\n    }\n    isOpen = !isOpen;\n});\n```\n\n## Support Tested\n\n- iOS (Safari 13 \u0026 Chrome 76)\n- Android (Brave 1.3.2 \u0026 Chrome 77)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauroreisvieira%2Fscroll-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauroreisvieira%2Fscroll-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauroreisvieira%2Fscroll-lock/lists"}