From ae6bcb45c76f82408f3459a48c23bfc07ddf8e74 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 30 Jan 2012 08:32:44 +0900 Subject: [PATCH] fix bug --- _keysnail.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index e80faa0..7ffd59f 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -510,11 +510,11 @@ key.suspendKey = "Not defined"; // ================================= Hooks ================================= // -hook.setHook('KeySnailInitialized', function () { +hook.addToHook('KeySnailInitialized', function () { ext.exec("shiitake-enable-style"); }); -hook.setHook('KeyBoardQuit', function (aEvent) { +hook.addToHook('KeyBoardQuit', function (aEvent) { ext.exec("hide-sidebar"); let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); gBrowser.focus(); @@ -527,7 +527,6 @@ hook.setHook('KeyBoardQuit', function (aEvent) { } key.generateKey(aEvent.originalTarget, KeyEvent.DOM_VK_ESCAPE, true); }); -hook.addToHook('KeyBoardQuit', function (aEvent) {}); hook.setHook('Unload', function () { util.getBrowserWindows().some(function (win) { @@ -541,6 +540,16 @@ hook.setHook('Unload', function () { }); }); +// hook.addToHook('LocationChange', function (aNsURI) { +// if(window.content.document.body){ +// display.prettyPrint(window.content.document.title); +// }else{ +// window.addEventListener("load", function(){ +// disp = display; +// disp.prettyPrint(window.content.document.title); +// }, false); +// } +// }); // ============================= Key bindings ============================== //