diff --git a/NEWS b/NEWS index 23dc03aa..32d0fc39 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
2008-05-14:
* version 1.1
+ * readded visualbellstyle (thanks mauke)
* new popups=4 option
2008-05-14:
diff --git a/content/liberator.js b/content/liberator.js
index 0da3b943..40f3d2f0 100644
--- a/content/liberator.js
+++ b/content/liberator.js
@@ -100,6 +100,11 @@ const liberator = (function () //{{{
{
setter: function (value) { liberator.options.setPref("accessibility.typeaheadfind.enablesound", !value); },
});
+
+ liberator.options.add(["visualbellstyle", "t_vb"],
+ "CSS specification of the visual bell",
+ "string", "border: none; background-color: black;"
+ );
}
function addMappings()
@@ -447,15 +452,20 @@ const liberator = (function () //{{{
{
if (liberator.options["visualbell"])
{
- // flash the visual bell
- var popup = document.getElementById("liberator-visualbell");
- var win = getBrowser().mPanelContainer;
- var box = document.getBoxObjectFor(win);
+ var vbs = liberator.options["visualbellstyle"];
+ if (vbs)
+ {
+ // flash the visual bell
+ var popup = document.getElementById("liberator-visualbell");
+ var win = getBrowser().mPanelContainer;
+ var box = document.getBoxObjectFor(win);
- popup.height = box.height;
- popup.width = box.width;
- popup.openPopup(win, "overlap", 0, 0, false, false);
- setTimeout(function () { popup.hidePopup(); }, 50);
+ popup.style.cssText = vbs;
+ popup.height = box.height;
+ popup.width = box.width;
+ popup.openPopup(win, "overlap", 0, 0, false, false);
+ setTimeout(function () { popup.hidePopup(); }, 50);
+ }
}
else
{
diff --git a/locale/en-US/options.txt b/locale/en-US/options.txt
index 1fd9f34d..a14e4c6b 100644
--- a/locale/en-US/options.txt
+++ b/locale/en-US/options.txt
@@ -546,6 +546,13 @@ Use visual bell instead of beeping on errors. For now you can't turn off both,
this will hopefully change.
____
+|\'visualbellstyle'| |\'t_vb'|
+||'visualbellstyle' 't_vb'|| string (default: "border: none; background-color: black;")
+____
+The CSS style to use for the visual bell. Set this to the empty string if you
+want no bell at all.
+____
+
|\'wim'| |\'wildmode'|
||'wildmode' 'wim'||
stringlist (default: "list:full")