mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 04:07:58 +01:00
added visualbellstyle (don't think it works on GTK at least)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user