[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 247/483: Automatically pre-select some element when selection starts
David Prévot
taffit at moszumanska.debian.org
Thu Jan 22 21:41:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.
commit e9db3d40732f3e8f230b6955dd850f762f12630c
Author: Wladimir Palant <trev at adblockplus.org>
Date: Mon Oct 25 16:06:36 2010 +0200
Automatically pre-select some element when selection starts
---
modules/Aardvark.jsm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/Aardvark.jsm b/modules/Aardvark.jsm
index 5b10078..01eec3a 100644
--- a/modules/Aardvark.jsm
+++ b/modules/Aardvark.jsm
@@ -78,6 +78,14 @@ Aardvark.start = function(wrapper) {
if (Prefs.showhelp)
this.showMenu();
+
+ // Make sure to select some element immeditely (whichever is in the center of the browser window)
+ let wndWidth = doc.documentElement.clientWidth;
+ let wndHeight = doc.documentElement.clientHeight;
+ if (doc.compatMode == "BackCompat") // clientHeight will be bogus in quirks mode
+ wndHeight = doc.documentElement.offsetHeight - doc.defaultView.scrollMaxY;
+ this.isUserSelected = false;
+ this.onMouseMove({clientX: wndWidth / 2, clientY: wndHeight / 2, screenX: -1, screenY: -1, target: null});
}
Aardvark.doCommand = function(command, event) {
@@ -483,7 +491,6 @@ Aardvark.quit = function ()
this.window = null;
this.browser = null;
this.commentElem = null;
- this.isUserSelected = false;
E = function(id) null;
return false;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git
More information about the Pkg-mozext-commits
mailing list