From ff823ff302ad57b71238b8bcaf7ab3f3d734a4a6 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 31 Mar 2012 18:12:09 +0100 Subject: [PATCH] Keeping JSHint happy --- js/macros/edit.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/macros/edit.js b/js/macros/edit.js index aac11e3d6..6b01041e8 100644 --- a/js/macros/edit.js +++ b/js/macros/edit.js @@ -17,7 +17,7 @@ function BitmapEditor(macroNode) { } BitmapEditor.prototype.getContent = function() { - return [Renderer.ElementNode("canvas",{},[])] + return [Renderer.ElementNode("canvas",{},[])]; }; BitmapEditor.prototype.renderInDom = function() { @@ -85,7 +85,7 @@ BitmapEditor.prototype.saveChanges = function() { BitmapEditor.prototype.isRefreshable = function() { // Don't ever refresh the bitmap editor return false; -} +}; function TextEditor(macroNode) { this.macroNode = macroNode; @@ -163,7 +163,7 @@ TextEditor.prototype.handleEvent = function(event) { TextEditor.prototype.isRefreshable = function() { // Don't refresh the editor if it contains the caret or selection return !window.getSelection().containsNode(this.macroNode.domNode, true); -} +}; exports.macro = { name: "edit", @@ -175,13 +175,13 @@ exports.macro = { // Get the tiddler being editted var tiddler = this.store.getTiddler(this.tiddlerTitle); // Figure out which editor to use - var editor = TextEditor; + var Editor = TextEditor; if(this.params.field === "text") { if(["image/jpg","image/jpeg","image/png","image/gif"].indexOf(tiddler.type) !== -1) { - editor = BitmapEditor; + Editor = BitmapEditor; } } - this.editor = new editor(this); + this.editor = new Editor(this); var content = this.editor.getContent(); for(var t=0; t