{"id":20776808,"url":"https://github.com/avocode/dragster","last_synced_at":"2026-03-12T07:33:53.215Z","repository":{"id":32659388,"uuid":"36247006","full_name":"avocode/dragster","owner":"avocode","description":"Better HTML5 drag events","archived":false,"fork":false,"pushed_at":"2016-08-26T10:04:52.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T18:09:52.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"SpongePowered/configurate","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avocode.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":"2015-05-25T18:19:05.000Z","updated_at":"2024-01-05T17:51:21.000Z","dependencies_parsed_at":"2022-09-11T03:40:49.422Z","dependency_job_id":null,"html_url":"https://github.com/avocode/dragster","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/avocode%2Fdragster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avocode%2Fdragster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avocode%2Fdragster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avocode%2Fdragster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avocode","download_url":"https://codeload.github.com/avocode/dragster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251758170,"owners_count":21638989,"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-17T13:12:00.648Z","updated_at":"2025-04-30T18:09:58.220Z","avatar_url":"https://github.com/avocode.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dragster-avocode-fork\n\nThis is a fork of original [dragster](https://github.com/bensmithett/dragster) package from Ben Smithett.\n\nHTML5 `dragenter` and `dragleave` events [are crap](http://www.quirksmode.org/blog/archives/2009/09/the_html5_drag.html). Dragster gives you sane new `dragster:enter` and `dragster:leave` events that behave just like `mouseenter` and `mouseleave`.\n\nDetecting when the user has dragged over a dropzone with child elements sucks. It usually involves transparent overlay elements, listening to the constantly-firing `dragover` event or nuking every other event with `pointer-events: none`.\n\nDragster is tiny (417 bytes minified \u0026 gzipped), unobtrusive \u0026 doesn't do much - it just add a couple of event listeners for `dragenter` and `dragleave` on the elements that you specify. It never does anything automagically, and doesn't cancel the original events.\n\nDragster works in latest stable Chrome, Firefox, Safari \u0026 Opera. It does nothing at all in IE 7-10 (IE [doesn't support DOM event constructors](http://www.2ality.com/2013/06/triggering-events.html)).\n\n@catmanjan maintains a [jQuery plugin version](https://github.com/catmanjan/jquery-dragster) of Dragster if you'd like better cross browser support.\n\n## Installation\n\n`npm install dragster-avocode-fork`\n\n## Setup\n\nJust include Dragster in your app, then bootstrap your dropzone elements with Dragster so they can start emitting `dragster:` events.\n\n```javascript\nvar dropzone = document.getElementById( \"my-dropzone\" );\nnew Dragster( dropzone );\n```\n\nThen you can add some plain old event listeners without pulling your hair out.\n\n```javascript\ndocument.addEventListener( \"dragster:enter\", function (e) {\n  e.target.classList.add( \"dragged-over\" );\n}, false );\n\ndocument.addEventListener( \"dragster:leave\", function (e) {\n  e.target.classList.remove( \"dragged-over\" );\n}, false );\n```\n\nYou can teardown a Dragster instance by calling `removeListeners`\n\n```javascript\ndragster = new Dragster( dropzone );\n// Dragging over dropzone emits dragster: events\ndragster.removeListeners();\n// Dragster events no longer emitted from dropzone\n```\n\n## Contributing\nDragster is written in [CoffeeScript](http://coffeescript.org/).\n\n```\nnpm install\nnpm run build\n```\n\n## License\nDragster is released under the [MIT License](http://ben.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favocode%2Fdragster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favocode%2Fdragster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favocode%2Fdragster/lists"}