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

Add Fullscreen autocommand

This commit is contained in:
Kris Maglione
2008-11-01 20:46:33 +00:00
parent f5bc695368
commit 12a9532e6c
5 changed files with 17 additions and 5 deletions

View File

@@ -269,6 +269,8 @@ function Events() //{{{
const input = liberator.input;
var fullscreen = window.fullScreen;
var inputBufferLength = 0; // count the number of keys in v.input.buffer (can be different from v.input.buffer.length)
var skipMap = false; // while feeding the keys (stored in v.input.buffer | no map found) - ignore mappings
@@ -360,6 +362,7 @@ function Events() //{{{
window.addEventListener("popuphidden", exitPopupMode, true);
window.addEventListener("DOMMenuBarActive", enterMenuMode, true);
window.addEventListener("DOMMenuBarInactive", exitMenuMode, true);
window.addEventListener("resize", onResize, true);
// window.document.addEventListener("DOMTitleChanged", function (event)
// {
@@ -469,6 +472,16 @@ function Events() //{{{
autocommands.trigger(name, args);
}
function onResize(event)
{
if (window.fullScreen != fullscreen)
{
fullscreen = window.fullScreen;
liberator.triggerObserver("fullscreen", fullscreen);
autocommands.trigger("Fullscreen", {url: "", fullscreen: fullscreen});
}
}
function onDOMContentLoaded(event)
{
if (event.originalTarget instanceof HTMLDocument)