1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 03:12:27 +01:00

added a visual bell and replaced the 'beep' option with 'visualbell'

This commit is contained in:
Doug Kearns
2007-09-08 09:50:33 +00:00
parent 635b6258c1
commit eb26d2cdc3
6 changed files with 36 additions and 9 deletions

View File

@@ -280,8 +280,26 @@ const vimperator = (function() //{{{
beep: function()
{
if (vimperator.options["beep"])
if (vimperator.options["visualbell"])
{
// flash the visual bell
var vbell = document.getElementById("vimperator-visualbell");
var box = getBrowser().mPanelContainer.boxObject;
vbell.style.position = "fixed";
vbell.style.height = box.height + "px";
vbell.style.width = box.width + "px";
vbell.style.left = box.x + "px";
vbell.style.top = box.y + "px";
vbell.hidden = false
setTimeout(function() { vbell.hidden = true; }, 50); // may as well be 0 ;-)
}
else
{
sound_service.beep();
}
},
copyToClipboard: function(str)