# Foxy Gestures
A mouse gestures extension for Firefox. This project was started as a web extensions alternative to FireGestures.
Unfortunately, FireGestures will stop working when XUL/XPCOM add-ons are fully deprecated in Firefox 57.
#### Feature Requests
FireGestures is a very mature plugin with a huge number of features. Although I used it for many years, I probably
didn't use it in the exact same way as you. Some features maybe have been unintentionally ignored or forgotten by me.
I am slowly implementing features in Foxy Gestures as my time allows. [This wiki article contains a list of supported
commands vs FireGestures](https://github.com/marklieberman/foxygestures/wiki/Supported-Commands-vs.-FireGestures). The
list is not exhaustive and you can request features using GitHub issues even if they are not currently planned.
#### Limitations
As a web extension, this add-on will never be as powerful as FireGestures. __This extension does not integrate into
about:home, about:newtab, view-source:, moz-extension:, etc. Nor will it work on addons.mozilla.com__, since web
extensions are forbidden from interacting with the add-on store.
More importantly, the __mouse gestures will not work until the document body of the website you are visiting has
parsed__. In other words, the DOM must be at least partially parsed but content does not have to be loaded. This
limitation also applies to frames within the website. This is an inherent limitation of web extensions at the moment,
because there is no API to get mouse events from browser chrome. In practice this is rarely an issue as mouse events
are typically available very quickly.
#### Working Principle
This extension hooks into DOM mouse events. However, each frame in a website is a separate DOM often with a separate
origin. In a naïve implementation the mouse gesture would stop tracking whenever the mouse passed over an iframe.
The solution is to have the web extension inject _mouseEvents.js_ into every frame. Each time the script loads it will
determine if it has been framed. If the script has been framed, it will establish communication with its parent frame
(also running _mouseEvents.js_) via `postMessage()`. Nested instances of the script will relay mouse events up the
hierarchy. As the message bubbles up the hierarchy, each script applies a coordinate offset based on the position of
the nested <frame> or <iframe> element. In this way, the top-most script sees all mouse events in the
coordinate space of the top-most DOM. _mouseEvents.js_ also maintains a small amount of state. To keep all instances
of the script in sync, this state is replicated by passing messages down the hierarchy. Ultimately, this setup provides
the extension with a seamless view of mouse events across all frames upon which to build the rest of the extension.
It is worth noting that DOM references cannot be shared via post message. As a result, a reference to the element under
the mouse gesture is only available in _mouseEvents.js_ in the frame which generated the event. To support features
that need information about the element, attributes are collected a priori and bundled with mouse event data for mouse
up/down events. To support situations that require access to the live DOM, _mouseEvents.js_ assigns a unique identifier
to each frame in which it loads. Messages may be addressed to a specific frame using the unique frame ID.
##### OSX/Linux Gesture Button Limitation
Note: this issue is resolved from FF58 and FG1.1.0 due to API changes landing in Firefox. ~~In OSX and Linux, the
context menu is shown on mouse down. (Context menu on mouse up is the default for Windows.) When FireGestures is
installed on OSX/Linux, it changes the context menu to be shown on mouse up. Web extensions cannot replicate this
functionality. Due to the issue described in [#4](https://github.com/marklieberman/foxygestures/issues/4) right-button
gestures work poorly in OSX/Linux.~~
没有合适的资源?快使用搜索试试~ 我知道了~
Firefox的鼠标手势_JavaScript_HTML_下载.zip
共66个文件
js:28个
html:10个
json:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 64 浏览量
2023-05-01
00:45:24
上传
评论
收藏 1002KB ZIP 举报
温馨提示
Firefox的鼠标手势_JavaScript_HTML_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
Firefox的鼠标手势_JavaScript_HTML_下载.zip (66个子文件)
foxygestures-master
extra
gesture-types.html 4KB
gulpfile.js 2KB
LICENSE.md 35KB
src
manifest.json 2KB
options
options.js 12KB
options.tab.commands.js 5KB
options.tab.userscripts.html 5KB
lib
ui-bootstrap-tpls-2.5.0.min.js 123KB
REVIEWERS.txt 1KB
ace
theme-chrome.js 3KB
mode-javascript.js 18KB
ace.js 367KB
font-awesome.min.css 30KB
ui-ace.js 10KB
angular.min.js 173KB
options.tab.moreprefs.html 6KB
options.scss 4KB
options.tab.userscripts.js 4KB
options.html 3KB
options.tab.backup.js 6KB
options.tab.othergestures.js 10KB
modal.chordGesture.html 1KB
options.tab.backup.html 1KB
options.tab.general.html 9KB
options.tab.othergestures.html 4KB
modal.askPermission.html 738B
images
intercardinal60.png 2KB
cardinal.png 884B
intercardinal45.png 3KB
options.tab.commands.html 2KB
options.tab.general.js 14KB
fonts
FontAwesome.otf 132KB
fontawesome-webfont.eot 162KB
fontawesome-webfont.woff 96KB
fontawesome-webfont.woff2 75KB
fontawesome-webfont.svg 434KB
fontawesome-webfont.ttf 162KB
options.tab.moreprefs.js 3KB
common
GestureDetector.js 4KB
Optional.js 1KB
icons
on.svg 3KB
icon.svg 4KB
off.svg 3KB
_locales
nl
messages.json 24KB
zh_TW
messages.json 30KB
ja_JP
messages.json 33KB
zh_CN
messages.json 30KB
en
messages.json 32KB
background
commands.js 54KB
helpers.js 8KB
handler.js 10KB
settings.js 6KB
updates.js 2KB
content
commands.js 17KB
helpers.js 7KB
handler.js 13KB
mouseEvents.js 34KB
interface.js 7KB
.jshintrc 359B
CHANGELOG.md 7KB
package.json 785B
package-lock.json 212KB
test
background
webex-mocks.js 77B
helpers.spec.js 4KB
.gitignore 51B
README.md 4KB
共 66 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功