[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 123/483: Adding command "lock/unlock selection"
David Prévot
taffit at moszumanska.debian.org
Thu Jan 22 21:41:33 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 6e9051c385786c636d5e974ae3103b3da637893e
Author: Wladimir Palant <trev at gtchat.de>
Date: Fri Jun 27 11:56:32 2008 +0000
Adding command "lock/unlock selection"
--HG--
extra : convert_revision : svn%3Ad8bf93c1-8190-44a8-bb31-1ea94378a4df/trunk%40943
---
chrome/content/aardvark.js | 25 +++++++++++++++++++------
chrome/locale/en-US/global.properties | 2 ++
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/chrome/content/aardvark.js b/chrome/content/aardvark.js
index ee6eea6..387e30b 100644
--- a/chrome/content/aardvark.js
+++ b/chrome/content/aardvark.js
@@ -29,13 +29,15 @@
var ehhAardvark = {
browser: null,
+ currentElem: null,
selectedElem: null,
commentElem : null,
mouseX: -1,
mouseY: -1,
commandLabelTimeout: 0,
borderElems: null,
- labelElem: null
+ labelElem: null,
+ locked: false
};
ehhAardvark.start = function(browser) {
@@ -165,14 +167,15 @@ ehhAardvark.onMouseOver = function(event) {
if (elem == null || aardvarkLabel)
{
- this.clearBox ();
+ this.currentElem = null;
+ if (!this.locked)
+ this.clearBox();
return;
}
- if (elem == this.selectedElem)
- return;
-
- this.showBoxAndLabel (elem, this.makeElementLabelString (elem));
+ this.currentElem = elem;
+ if (!this.locked && this.currentElem != this.selectedElem)
+ this.showBoxAndLabel(this.currentElem, this.makeElementLabelString(this.currentElem));
}
ehhAardvark.onKeyPress = function(event) {
@@ -437,6 +440,7 @@ ehhAardvark.setElementStyleDefault = function (elem, bgColor)
// 0: name, 1: needs element
ehhAardvark.commands = [
"select",
+ "lock",
"wider",
"narrower",
"quit",
@@ -526,6 +530,15 @@ ehhAardvark.select = function (elem)
}
//------------------------------------------------------------
+ehhAardvark.lock = function (elem)
+{
+ this.locked = !this.locked;
+ if (!this.locked && this.currentElem != this.selectedElem)
+ this.showBoxAndLabel(this.currentElem, this.makeElementLabelString(this.currentElem));
+ return true;
+}
+
+//------------------------------------------------------------
ehhAardvark.blinkElement = function (elem)
{
if (!elem)
diff --git a/chrome/locale/en-US/global.properties b/chrome/locale/en-US/global.properties
index 0c5d2d3..3678a9e 100644
--- a/chrome/locale/en-US/global.properties
+++ b/chrome/locale/en-US/global.properties
@@ -1,5 +1,7 @@
command.select.key=s
command.select.label=select element
+command.lock.key=l
+command.lock.label=lock/unlock selection
command.wider.key=w
command.wider.label=wider
command.narrower.key=n
--
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