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

Some constants to save my sanity.

This commit is contained in:
Kris Maglione
2010-12-31 00:30:59 -05:00
parent 2181874af3
commit 3f3e89e270
4 changed files with 33 additions and 22 deletions

View File

@@ -900,6 +900,7 @@ var Hints = Module("hints", {
* @param {Event} event The event to handle.
*/
onEvent: function onEvent(event) {
const KILL = false, PASS = true;
let key = events.toString(event);
this.clearTimeout();
@@ -918,7 +919,7 @@ var Hints = Module("hints", {
this._updateStatusline();
if (!this._canUpdate)
return;
return PASS;
if (this._docs.length == 0) {
this._generate();
@@ -929,10 +930,10 @@ var Hints = Module("hints", {
dactyl.assert(this._hintNumber != 0);
this._checkUnique();
return false;
return KILL;
}
return !Events.isEscape(key);
return Events.isEscape(key) ? KILL : PASS;
}
//}}}
}, {