https://github.com/frectonz/act-on-press
A web extension that let's you trigger click actions on press instead of release.
https://github.com/frectonz/act-on-press
firefox-addon web-extension
Last synced: 9 months ago
JSON representation
A web extension that let's you trigger click actions on press instead of release.
- Host: GitHub
- URL: https://github.com/frectonz/act-on-press
- Owner: frectonz
- Created: 2024-05-12T09:21:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-12T12:47:58.000Z (about 2 years ago)
- Last Synced: 2024-11-14T10:36:46.529Z (over 1 year ago)
- Topics: firefox-addon, web-extension
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Act on Press
A web extension that let's you trigger click actions on press instead of release.
## How
- Make `a` and `button` tags trigger their click action on `mousedown` instead of `click`.
- Overload the `onclick` attribute to be `onmousedown` on every element.
- Overload the `addEventListener` function of every element, to rename `"click"` events to be `"mousedown"` events.