1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 12:57:58 +01:00

minor refactoring of vimperator.beep

This commit is contained in:
Doug Kearns
2007-10-16 03:58:01 +00:00
parent 70a4dff190
commit 4a7059d524

View File

@@ -198,26 +198,22 @@ const vimperator = (function() //{{{
beep: function()
{
if (!vimperator.options["visualbell"])
if (vimperator.options["visualbell"])
{
// flash the visual bell
var popup = document.getElementById("vimperator-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);
}
else
{
sound_service.beep();
return;
}
// flash the visual bell
var popup = document.getElementById("vimperator-visualbell");
var win = getBrowser().mPanelContainer;
var box = document.getBoxObjectFor(win);
popup.height = box.height;
popup.width = box.width;
//popup.style.backgroundColor = "black";
////popup.showPopup(win, box.screenX, box.screenY, "popup");
//popup.showPopup(win, -1, -1, "popup", "topleft", "topleft");
popup.openPopup(win, "overlap", 0, 0, false, false)
setTimeout(function() { popup.hidePopup(); }, 50);
},
copyToClipboard: function(str)