1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-16 10:55:46 +01:00

Move :downloads button logic into binding classes.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-23 23:25:08 -05:00
parent df4fc65102
commit 3cd40141f9
5 changed files with 100 additions and 32 deletions

View File

@@ -1083,7 +1083,6 @@ var CommandLine = Module("commandline", {
// TODO: Wouldn't multiple handlers be cleaner? --djk
if (event.type == "click" && event.target instanceof HTMLAnchorElement) {
util.dump(event.getPreventDefault(), event.target);
if (event.getPreventDefault())
return;

View File

@@ -92,7 +92,11 @@ var ProcessorStack = Class("ProcessorStack", {
else if (this.actions.length) {
if (actions.length == 0)
dactyl.beep();
result = this.actions[0]() === Events.PASS ? Events.PASS : Events.KILL;
if (modes.replaying && !events.waitForPageLoad())
result = Events.KILL;
else
result = this.actions[0]() === Events.PASS ? Events.PASS : Events.KILL;
}
else if (result !== Events.KILL && processors.some(function (p) !p.main.passUnknown)) {
result = Events.KILL;
@@ -175,8 +179,6 @@ var KeyProcessor = Class("KeyProcessor", {
return KeyArgProcessor(this, map, false, "arg");
else if (map.motion)
return KeyArgProcessor(this, map, true, "motion");
else if (modes.replaying && !events.waitForPageLoad())
return Events.KILL;
return this.execute(map, { count: this.count, command: this.command, events: this.events });
}