{"id":19529886,"url":"https://github.com/loopmode/scrollbarwidth","last_synced_at":"2025-10-24T19:33:01.457Z","repository":{"id":140400039,"uuid":"94982193","full_name":"loopmode/scrollbarwidth","owner":"loopmode","description":"Very simple script for getting the width of the browser scrollbar","archived":false,"fork":false,"pushed_at":"2018-08-09T12:10:51.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T07:47:26.366Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/loopmode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-06-21T08:37:47.000Z","updated_at":"2018-08-09T12:10:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd02823c-7e58-431a-909c-2f21d880e7be","html_url":"https://github.com/loopmode/scrollbarwidth","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fscrollbarwidth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fscrollbarwidth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fscrollbarwidth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fscrollbarwidth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopmode","download_url":"https://codeload.github.com/loopmode/scrollbarwidth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240783109,"owners_count":19856776,"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":[],"created_at":"2024-11-11T01:28:01.153Z","updated_at":"2025-10-24T19:32:56.416Z","avatar_url":"https://github.com/loopmode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scrollbarwidth\n\nExtremely simple script for getting the current width of the browser window scrollbar.\n\nIf there is no scrollbar when invoked, `0` is returned.\n\n### Installation\n\n    # using npm\n    npm install @loopmode/scrollbarwidth --save\n\n    # using yarn\n    yarn add @loopmode/scrollbarwidth\n\n### Usage\n\nYou can provide a DOM element as argument to check it for its scrollbar width. When you call the function without arguments, it returns the width of the global window scrollbar.\nYou can require/import it any way you wish, and you can also access `window.scrollbarwidth`.\n\n    import scrollbarwidth from '@loopmode/scrollbarwidth';\n\n    var windowHasScrollbar = scrollbarwidth() \u003e 0;\n    var elHasScrollbar = scrollbarwidth(document.querySelector('.my-element')) \u003e 0;\n\nHave a look at the [code at github](https://github.com/loopmode/scrollbarwidth/blob/master/scrollbarwidth.js#L10-L15). It's ridiculously simple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Fscrollbarwidth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopmode%2Fscrollbarwidth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Fscrollbarwidth/lists"}