JSHint-prompted tweaks

This commit is contained in:
Jeremy Ruston
2012-05-19 15:13:17 +01:00
parent 3e899d8daf
commit 6a7a5a2591
10 changed files with 62 additions and 79 deletions
+8 -9
View File
@@ -21,15 +21,14 @@ exports.info = {
};
exports.handleEvent = function(event) {
switch(event.type) {
case "click":
var buttonEvent = document.createEvent("Event");
buttonEvent.initEvent("tw-" + this.params.name,true,true);
buttonEvent.tiddlerTitle = this.tiddlerTitle;
buttonEvent.commandOrigin = this;
event.target.dispatchEvent(buttonEvent);
event.preventDefault();
return false;
if(event.type === "click") {
var buttonEvent = document.createEvent("Event");
buttonEvent.initEvent("tw-" + this.params.name,true,true);
buttonEvent.tiddlerTitle = this.tiddlerTitle;
buttonEvent.commandOrigin = this;
event.target.dispatchEvent(buttonEvent);
event.preventDefault();
return false;
}
return true;
};