{"id":13476957,"url":"https://github.com/marklieberman/foxygestures","last_synced_at":"2025-03-27T04:31:48.044Z","repository":{"id":19622868,"uuid":"87508341","full_name":"marklieberman/foxygestures","owner":"marklieberman","description":"Mouse gestures for Firefox","archived":false,"fork":false,"pushed_at":"2022-04-29T03:13:58.000Z","size":2678,"stargazers_count":184,"open_issues_count":70,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-14T19:59:59.103Z","etag":null,"topics":["addons","firefox","mouse-gestures"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marklieberman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-07T05:34:34.000Z","updated_at":"2024-04-09T14:56:56.000Z","dependencies_parsed_at":"2022-09-08T03:10:11.858Z","dependency_job_id":null,"html_url":"https://github.com/marklieberman/foxygestures","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/marklieberman%2Ffoxygestures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marklieberman%2Ffoxygestures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marklieberman%2Ffoxygestures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marklieberman%2Ffoxygestures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marklieberman","download_url":"https://codeload.github.com/marklieberman/foxygestures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245785158,"owners_count":20671621,"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":["addons","firefox","mouse-gestures"],"created_at":"2024-07-31T16:01:36.608Z","updated_at":"2025-03-27T04:31:44.448Z","avatar_url":"https://github.com/marklieberman.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Foxy Gestures\r\n\r\nA mouse gestures extension for Firefox. This project was started as a web extensions alternative to FireGestures.\r\nUnfortunately, FireGestures will stop working when XUL/XPCOM add-ons are fully deprecated in Firefox 57.\r\n\r\n#### Feature Requests\r\n\r\nFireGestures is a very mature plugin with a huge number of features. Although I used it for many years, I probably\r\ndidn't use it in the exact same way as you. Some features maybe have been unintentionally ignored or forgotten by me.\r\nI am slowly implementing features in Foxy Gestures as my time allows. [This wiki article contains a list of supported\r\ncommands vs FireGestures](https://github.com/marklieberman/foxygestures/wiki/Supported-Commands-vs.-FireGestures). The\r\nlist is not exhaustive and you can request features using GitHub issues even if they are not currently planned.\r\n\r\n#### Limitations\r\n\r\nAs a web extension, this add-on will never be as powerful as FireGestures. __This extension does not integrate into\r\nabout:home, about:newtab, view-source:, moz-extension:, etc. Nor will it work on addons.mozilla.com__, since web\r\nextensions are forbidden from interacting with the add-on store.\r\n\r\nMore importantly, the __mouse gestures will not work until the document body of the website you are visiting has\r\nparsed__. In other words, the DOM must be at least partially parsed but content does not have to be loaded. This\r\nlimitation also applies to frames within the website. This is an inherent limitation of web extensions at the moment,\r\nbecause there is no API to get mouse events from browser chrome. In practice this is rarely an issue as mouse events\r\nare typically available very quickly.\r\n\r\n#### Working Principle\r\n\r\nThis extension hooks into DOM mouse events. However, each frame in a website is a separate DOM often with a separate\r\norigin. In a naïve implementation the mouse gesture would stop tracking whenever the mouse passed over an iframe.\r\n\r\nThe solution is to have the web extension inject _mouseEvents.js_ into every frame. Each time the script loads it will\r\ndetermine if it has been framed. If the script has been framed, it will establish communication with its parent frame\r\n(also running _mouseEvents.js_) via `postMessage()`. Nested instances of the script will relay mouse events up the\r\nhierarchy. As the message bubbles up the hierarchy, each script applies a coordinate offset based on the position of\r\nthe nested \u0026lt;frame\u0026gt; or \u0026lt;iframe\u0026gt; element. In this way, the top-most script sees all mouse events in the\r\ncoordinate space of the top-most DOM. _mouseEvents.js_ also maintains a small amount of state. To keep all instances\r\nof the script in sync, this state is replicated by passing messages down the hierarchy. Ultimately, this setup provides\r\nthe extension with a seamless view of mouse events across all frames upon which to build the rest of the extension.\r\n\r\nIt is worth noting that DOM references cannot be shared via post message. As a result, a reference to the element under\r\nthe mouse gesture is only available in _mouseEvents.js_ in the frame which generated the event. To support features\r\nthat need information about the element, attributes are collected a priori and bundled with mouse event data for mouse\r\nup/down events. To support situations that require access to the live DOM, _mouseEvents.js_ assigns a unique identifier\r\nto each frame in which it loads. Messages may be addressed to a specific frame using the unique frame ID.\r\n\r\n##### OSX/Linux Gesture Button Limitation\r\n\r\nNote: this issue is resolved from FF58 and FG1.1.0 due to API changes landing in Firefox. ~~In OSX and Linux, the\r\ncontext menu is shown on mouse down. (Context menu on mouse up is the default for Windows.) When FireGestures is\r\ninstalled on OSX/Linux, it changes the context menu to be shown on mouse up. Web extensions cannot replicate this\r\nfunctionality. Due to the issue described in [#4](https://github.com/marklieberman/foxygestures/issues/4) right-button\r\ngestures work poorly in OSX/Linux.~~\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarklieberman%2Ffoxygestures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarklieberman%2Ffoxygestures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarklieberman%2Ffoxygestures/lists"}