diff --git a/boot/boot.js b/boot/boot.js index ba780a109..8d74b2e1b 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1154,7 +1154,7 @@ $tw.Wiki = function(options) { var index = tiddlerTitles.indexOf(title); if(index !== -1) { tiddlerTitles.splice(index,1); - } + } } // Record the new tiddler state updateDescriptor["new"] = { @@ -1301,7 +1301,7 @@ $tw.Wiki = function(options) { } } else { if(pluginInfo[title]) { - delete pluginInfo[title]; + delete pluginInfo[title]; results.deletedPlugins.push(title); } } @@ -1940,7 +1940,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) { } } else { console.log("Warning: a directory in a tiddlywiki.files file does not exist."); - console.log("dirPath: " + dirPath); + console.log("dirPath: " + dirPath); console.log("tiddlywiki.files location: " + filepath); } } @@ -2199,7 +2199,7 @@ $tw.loadTiddlersNode = function() { type = parts[0]; if(parts.length === 3 && ["plugins","themes","languages"].indexOf(type) !== -1) { $tw.loadPlugins([parts[1] + "/" + parts[2]],$tw.config[type + "Path"],$tw.config[type + "EnvVar"]); - } + } } }); // Load the tiddlers from the wiki directory diff --git a/core/modules/commander.js b/core/modules/commander.js index 302af525b..b55679a2e 100644 --- a/core/modules/commander.js +++ b/core/modules/commander.js @@ -154,7 +154,7 @@ Commander.prototype.extractNamedParameters = function(params,mandatoryParameters if(errors.length > 0) { return errors.join(" and\n"); } else { - return paramsByName; + return paramsByName; } }; diff --git a/core/modules/commands/fetch.js b/core/modules/commands/fetch.js index 8d0997010..07cda691c 100644 --- a/core/modules/commands/fetch.js +++ b/core/modules/commands/fetch.js @@ -115,7 +115,7 @@ Command.prototype.fetchFile = function(url,options,callback,redirectCount) { if(response.statusCode === 302 || response.statusCode === 303 || response.statusCode === 307) { return self.fetchFile(response.headers.location,options,callback,redirectCount + 1); } else { - return callback("Error " + response.statusCode + " retrieving " + url) + return callback("Error " + response.statusCode + " retrieving " + url) } } }); diff --git a/core/modules/commands/rendertiddlers.js b/core/modules/commands/rendertiddlers.js index dd875e3eb..01af09649 100644 --- a/core/modules/commands/rendertiddlers.js +++ b/core/modules/commands/rendertiddlers.js @@ -36,7 +36,7 @@ Command.prototype.execute = function() { filter = this.params[0], template = this.params[1], outputPath = this.commander.outputPath, - pathname = path.resolve(outputPath,this.params[2]), + pathname = path.resolve(outputPath,this.params[2]), type = this.params[3] || "text/html", extension = this.params[4] || ".html", deleteDirectory = (this.params[5] || "").toLowerCase() !== "noclean", diff --git a/core/modules/commands/savewikifolder.js b/core/modules/commands/savewikifolder.js index cd4b5f26e..406f3a3b2 100644 --- a/core/modules/commands/savewikifolder.js +++ b/core/modules/commands/savewikifolder.js @@ -97,7 +97,7 @@ WikiFolderMaker.prototype.save = function() { // A custom plugin self.log("Processing custom plugin: " + title); self.saveCustomPlugin(tiddler); - } + } } else { // Ordinary tiddler self.saveTiddler("tiddlers",tiddler); diff --git a/core/modules/deserializers.js b/core/modules/deserializers.js index 3139a2611..47e891ed7 100644 --- a/core/modules/deserializers.js +++ b/core/modules/deserializers.js @@ -31,7 +31,7 @@ var parseTiddlerDiv = function(text /* [,fields] */) { for(var f=1; f 1)) { //Escape regexp characters if the operand is not a regular expression @@ -156,7 +156,7 @@ exports.pad = function(source,operator,options) { var padString = "", padStringLength = targetLength - title.length; while (padStringLength > padString.length) { - padString += fill; + padString += fill; } //make sure we do not exceed the specified length padString = padString.slice(0,padStringLength); diff --git a/core/modules/filters/tag.js b/core/modules/filters/tag.js index e7ddbb361..951a28c6b 100644 --- a/core/modules/filters/tag.js +++ b/core/modules/filters/tag.js @@ -50,7 +50,7 @@ exports.tag = function(source,operator,options) { }); results = options.wiki.sortByList(results,operator.operand); } - } + } } return results; }; diff --git a/core/modules/filters/x-listops.js b/core/modules/filters/x-listops.js index cb8c031a2..760f581a1 100644 --- a/core/modules/filters/x-listops.js +++ b/core/modules/filters/x-listops.js @@ -193,7 +193,7 @@ Extended filter operators to manipulate the current list. step = stepSize || 1, i = 0, opLength = operands.length, - nextOperandIndex; + nextOperandIndex; for(i; i < opLength; i++) { resultsIndex = results.indexOf(operands[i]); if(resultsIndex !== -1) { @@ -211,12 +211,12 @@ Extended filter operators to manipulate the current list. } else { results.push(operands[0]); } - return results; + return results; } /* Toggles an item in the current list. - */ + */ exports.toggle = function(source,operator) { return cycleValueInArray(prepare_results(source),operator.operands); } @@ -228,8 +228,8 @@ Extended filter operators to manipulate the current list. if(step < 0) { operands.reverse(); step = Math.abs(step); - } + } return cycleValueInArray(results,operands,step); } - + })(); diff --git a/core/modules/indexers/field-indexer.js b/core/modules/indexers/field-indexer.js index 0f070e5e5..e49583610 100644 --- a/core/modules/indexers/field-indexer.js +++ b/core/modules/indexers/field-indexer.js @@ -121,7 +121,7 @@ FieldIndexer.prototype.update = function(updateDescriptor) { indexEntry[value].push(updateDescriptor["new"].tiddler.fields.title); } } - }); + }); } }; diff --git a/core/modules/indexers/tag-indexer.js b/core/modules/indexers/tag-indexer.js index c7d297fc9..4721fea08 100644 --- a/core/modules/indexers/tag-indexer.js +++ b/core/modules/indexers/tag-indexer.js @@ -65,7 +65,7 @@ TagSubIndexer.prototype.rebuild = function() { } else { self.index[tag].titles.push(title); } - }); + }); }); }; @@ -83,7 +83,7 @@ TagSubIndexer.prototype.lookup = function(tag) { if(!indexRecord.isSorted) { if(this.indexer.wiki.sortByList) { indexRecord.titles = this.indexer.wiki.sortByList(indexRecord.titles,tag); - } + } indexRecord.isSorted = true; } return indexRecord.titles; diff --git a/core/modules/info/platform.js b/core/modules/info/platform.js index b9c140956..0eb0b9ea8 100644 --- a/core/modules/info/platform.js +++ b/core/modules/info/platform.js @@ -22,7 +22,7 @@ exports.getInfoTiddlerFields = function(updateInfoTiddlersCallback) { if($tw.browser) { // Document location var setLocationProperty = function(name,value) { - infoTiddlerFields.push({title: "$:/info/url/" + name, text: value}); + infoTiddlerFields.push({title: "$:/info/url/" + name, text: value}); }, location = document.location; setLocationProperty("full", (location.toString()).split("#")[0]); diff --git a/core/modules/parsers/wikiparser/rules/table.js b/core/modules/parsers/wikiparser/rules/table.js index fb72f6890..61cd71948 100644 --- a/core/modules/parsers/wikiparser/rules/table.js +++ b/core/modules/parsers/wikiparser/rules/table.js @@ -161,7 +161,7 @@ exports.parse = function() { // Move the caption to the first row if it isn't already if(table.children.length !== 1) { table.children.pop(); // Take rowContainer out of the children array - table.children.splice(0,0,rowContainer); // Insert it at the bottom + table.children.splice(0,0,rowContainer); // Insert it at the bottom } // Set the alignment - TODO: figure out why TW did this // rowContainer.attributes.align = rowCount === 0 ? "top" : "bottom"; diff --git a/core/modules/parsers/wikiparser/wikiparser.js b/core/modules/parsers/wikiparser/wikiparser.js index e6f860a91..0f917b2b2 100644 --- a/core/modules/parsers/wikiparser/wikiparser.js +++ b/core/modules/parsers/wikiparser/wikiparser.js @@ -378,7 +378,7 @@ WikiParser.prototype.pushTextWidget = function(array,text) { text = $tw.utils.trim(text); } if(text) { - array.push({type: "text", text: text}); + array.push({type: "text", text: text}); } }; diff --git a/core/modules/savers/upload.js b/core/modules/savers/upload.js index a7264338d..6ac056ba9 100644 --- a/core/modules/savers/upload.js +++ b/core/modules/savers/upload.js @@ -50,7 +50,7 @@ UploadSaver.prototype.save = function(text,method,callback) { url = "http://" + username + ".tiddlyspot.com/store.cgi"; } // Assemble the header - var boundary = "---------------------------" + "AaB03x"; + var boundary = "---------------------------" + "AaB03x"; var uploadFormName = "UploadPlugin"; var head = []; head.push("--" + boundary + "\r\nContent-disposition: form-data; name=\"UploadPlugin\"\r\n"); diff --git a/core/modules/server/routes/get-login-basic.js b/core/modules/server/routes/get-login-basic.js index 2a71d6e33..d573a0b5d 100644 --- a/core/modules/server/routes/get-login-basic.js +++ b/core/modules/server/routes/get-login-basic.js @@ -22,7 +22,7 @@ exports.handler = function(request,response,state) { response.writeHead(401,{ "WWW-Authenticate": 'Basic realm="Please provide your username and password to login to ' + state.server.servername + '"' }); - response.end(); + response.end(); } else { // Redirect to the root wiki if login worked var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: "/"; diff --git a/core/modules/server/server.js b/core/modules/server/server.js index ed3359dc1..b4859a2b4 100644 --- a/core/modules/server/server.js +++ b/core/modules/server/server.js @@ -42,7 +42,7 @@ function Server(options) { if(options.variables[variable]) { this.variables[variable] = options.variables[variable]; } - } + } } $tw.utils.extend({},this.defaultVariables,options.variables); // Initialise CSRF @@ -244,7 +244,7 @@ Server.prototype.requestHandler = function(request,response,options) { if(!this.csrfDisable && authorizationType === "writers" && request.headers["x-requested-with"] !== "TiddlyWiki") { response.writeHead(403,"'X-Requested-With' header required to login to '" + this.servername + "'"); response.end(); - return; + return; } // Check whether anonymous access is granted state.allowAnon = this.isAuthorized(authorizationType,null); @@ -253,7 +253,7 @@ Server.prototype.requestHandler = function(request,response,options) { if(!this.authenticators[0].authenticateRequest(request,response,state)) { // Bail if we failed (the authenticator will have sent the response) return; - } + } } // Authorize with the authenticated username if(!this.isAuthorized(authorizationType,state.authenticatedUsername)) { diff --git a/core/modules/startup/favicon.js b/core/modules/startup/favicon.js index 0e730905f..55e7891e2 100644 --- a/core/modules/startup/favicon.js +++ b/core/modules/startup/favicon.js @@ -17,7 +17,7 @@ exports.name = "favicon"; exports.platforms = ["browser"]; exports.after = ["startup"]; exports.synchronous = true; - + // Favicon tiddler var FAVICON_TITLE = "$:/favicon.ico"; diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index 353c25958..6486cf6a2 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -27,7 +27,7 @@ exports.startup = function() { }); $tw.rootWidget.addEventListener("tm-show-switcher",function(event) { $tw.modal.display("$:/core/ui/SwitcherModal",{variables: event.paramObject, event: event}); - }); + }); // Install the notification mechanism $tw.notifier = new $tw.utils.Notifier($tw.wiki); $tw.rootWidget.addEventListener("tm-notify",function(event) { @@ -68,7 +68,7 @@ exports.startup = function() { fullScreenDocument[fullscreen._exitFullscreen](); } else { fullScreenDocument.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT); - } + } } }); } diff --git a/core/modules/startup/story.js b/core/modules/startup/story.js index 0ca975ce3..18f8e8f1d 100644 --- a/core/modules/startup/story.js +++ b/core/modules/startup/story.js @@ -101,7 +101,7 @@ exports.startup = function() { updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(), targetTiddler: event.param || event.tiddlerTitle, copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permaview" : "none" - }); + }); }); } }; @@ -165,7 +165,7 @@ function openStartupTiddlers(options) { story.addToHistory(target); } else if(storyList.length > 0) { story.addToHistory(storyList[0]); - } + } } } diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index e5f726f5f..fe6925b99 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -32,7 +32,7 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) { } if(duration) { // Scroll the node into view - this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement}); + this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement}); } else { targetElement.scrollIntoView(); } diff --git a/core/modules/utils/csv.js b/core/modules/utils/csv.js index 37312d847..dec280d8b 100644 --- a/core/modules/utils/csv.js +++ b/core/modules/utils/csv.js @@ -38,7 +38,7 @@ exports.parseCsvStringWithHeader = function(text,options) { var columnName = headings[column]; columnResult[columnName] = $tw.utils.trim(columns[column] || ""); } - results.push(columnResult); + results.push(columnResult); } return results; } diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 299011136..36c250b20 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -69,7 +69,7 @@ Get the first parent element that has scrollbars or use the body as fallback. */ exports.getScrollContainer = function(el) { var doc = el.ownerDocument; - while(el.parentNode) { + while(el.parentNode) { el = el.parentNode; if(el.scrollTop) { return el; @@ -208,7 +208,7 @@ exports.addEventListeners = function(domNode,events) { if(eventInfo.handlerMethod) { handler = function(event) { eventInfo.handlerObject[eventInfo.handlerMethod].call(eventInfo.handlerObject,event); - }; + }; } else { handler = eventInfo.handlerObject; } diff --git a/core/modules/utils/dom/dragndrop.js b/core/modules/utils/dom/dragndrop.js index 206846b9f..de30d49c7 100644 --- a/core/modules/utils/dom/dragndrop.js +++ b/core/modules/utils/dom/dragndrop.js @@ -27,7 +27,7 @@ exports.makeDraggable = function(options) { domNode = options.domNode; // Make the dom node draggable (not necessary for anchor tags) if((domNode.tagName || "").toLowerCase() !== "a") { - domNode.setAttribute("draggable","true"); + domNode.setAttribute("draggable","true"); } // Add event handlers $tw.utils.addEventListeners(domNode,[ @@ -80,7 +80,7 @@ exports.makeDraggable = function(options) { } // Set up the data transfer if(dataTransfer.clearData) { - dataTransfer.clearData(); + dataTransfer.clearData(); } var jsonData = []; if(titles.length > 1) { diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index db66b1abc..58ffba6a4 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -105,7 +105,7 @@ Modal.prototype.display = function(title,options) { parentWidget: $tw.rootWidget }); navigatorWidgetNode.render(modalBody,null); - + // Render the title of the message var headerWidgetNode = this.wiki.makeTranscludeWidget(title,{ field: "subtitle", diff --git a/core/modules/utils/dom/popup.js b/core/modules/utils/dom/popup.js index 4ae1a44cd..5eed80c88 100644 --- a/core/modules/utils/dom/popup.js +++ b/core/modules/utils/dom/popup.js @@ -145,7 +145,7 @@ Popup.prototype.show = function(options) { } // Add the click handler if we have any popups if(this.popups.length > 0) { - this.rootElement.addEventListener("click",this,true); + this.rootElement.addEventListener("click",this,true); } }; diff --git a/core/modules/utils/dom/scroller.js b/core/modules/utils/dom/scroller.js index 3f4c71cef..8e49a1f1d 100644 --- a/core/modules/utils/dom/scroller.js +++ b/core/modules/utils/dom/scroller.js @@ -52,7 +52,7 @@ PageScroller.prototype.handleEvent = function(event) { if(event.paramObject && event.paramObject.selector) { this.scrollSelectorIntoView(null,event.paramObject.selector); } else { - this.scrollIntoView(event.target); + this.scrollIntoView(event.target); } return false; // Event was handled } @@ -103,7 +103,7 @@ PageScroller.prototype.scrollIntoView = function(element,callback) { if(duration <= 0) { t = 1; } else { - t = ((Date.now()) - self.startTime) / duration; + t = ((Date.now()) - self.startTime) / duration; } if(t >= 1) { self.cancelScroll(srcWindow); @@ -126,7 +126,7 @@ PageScroller.prototype.scrollSelectorIntoView = function(baseElement,selector,ca baseElement = baseElement || document.body; var element = baseElement.querySelector(selector); if(element) { - this.scrollIntoView(element,callback); + this.scrollIntoView(element,callback); } }; diff --git a/core/modules/utils/filesystem.js b/core/modules/utils/filesystem.js index 121cbc4c7..25392e738 100644 --- a/core/modules/utils/filesystem.js +++ b/core/modules/utils/filesystem.js @@ -372,7 +372,7 @@ exports.generateTiddlerFilepath = function(title,options) { // If the resulting filename is blank (eg because the title is just punctuation) if(!filepath || /^_+$/g.test(filepath)) { // ...then just use the character codes of the title - filepath = ""; + filepath = ""; $tw.utils.each(title.split(""),function(char) { if(filepath) { filepath += "-"; @@ -488,7 +488,7 @@ exports.deleteTiddlerFile = function(fileInfo,callback) { fs.unlink(fileInfo.filepath,function(err) { if(err) { return callback(err); - } + } // Delete the metafile if present if(fileInfo.hasMetaFile && fs.existsSync(fileInfo.filepath + ".meta")) { fs.unlink(fileInfo.filepath + ".meta",function(err) { diff --git a/core/modules/utils/logger.js b/core/modules/utils/logger.js index b3981986d..7dc35899f 100644 --- a/core/modules/utils/logger.js +++ b/core/modules/utils/logger.js @@ -45,7 +45,7 @@ Logger.prototype.log = function(/* args */) { self.saveBufferLogger.buffer += " " + arg; }); this.saveBufferLogger.buffer += "\n"; - this.saveBufferLogger.buffer = this.saveBufferLogger.buffer.slice(-this.saveBufferLogger.saveLimit); + this.saveBufferLogger.buffer = this.saveBufferLogger.buffer.slice(-this.saveBufferLogger.saveLimit); } if(console !== undefined && console.log !== undefined) { return Function.apply.call(console.log, console, [$tw.utils.terminalColour(this.colour),this.componentName + ":"].concat(Array.prototype.slice.call(arguments,0)).concat($tw.utils.terminalColour())); @@ -111,7 +111,7 @@ Logger.prototype.alert = function(/* args */) { } else { // Print an orange message to the console if not in the browser console.error("\x1b[1;33m" + text + "\x1b[0m"); - } + } } }; diff --git a/core/modules/utils/performance.js b/core/modules/utils/performance.js index 9908be4d7..8a86d33c7 100644 --- a/core/modules/utils/performance.js +++ b/core/modules/utils/performance.js @@ -21,7 +21,7 @@ function Performance(enabled) { Performance.prototype.showGreeting = function() { if($tw.browser) { - this.logger.log("Execute $tw.perf.log(); to see filter execution timings"); + this.logger.log("Execute $tw.perf.log(); to see filter execution timings"); } }; diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index b1d82a427..9c29391ae 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -150,7 +150,7 @@ Convert a string to title case (ie capitalise each initial letter) exports.toTitleCase = function(str) { return (str || "").replace(/(^|\s)\S/g, function(c) {return c.toUpperCase();}); } - + /* Find the line break preceding a given position in a string Returns position immediately after that line break, or the start of the string @@ -842,7 +842,7 @@ exports.makeDataUri = function(text,type,_canonical_uri) { parts.push(type); parts.push(isBase64 ? ";base64" : ""); parts.push(","); - parts.push(isBase64 ? text : encodeURIComponent(text)); + parts.push(isBase64 ? text : encodeURIComponent(text)); } return parts.join(""); }; diff --git a/core/modules/widgets/action-deletefield.js b/core/modules/widgets/action-deletefield.js index 45425bf4e..5857ef64d 100644 --- a/core/modules/widgets/action-deletefield.js +++ b/core/modules/widgets/action-deletefield.js @@ -73,7 +73,7 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) { } }); if(hasChanged) { - this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,removeFields,this.wiki.getModificationFields())); + this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,removeFields,this.wiki.getModificationFields())); } } return true; // Action was invoked diff --git a/core/modules/widgets/action-listops.js b/core/modules/widgets/action-listops.js index a3448ba71..802fcaa76 100644 --- a/core/modules/widgets/action-listops.js +++ b/core/modules/widgets/action-listops.js @@ -80,7 +80,7 @@ ActionListopsWidget.prototype.invokeAction = function(triggeringWidget, tagfilter = $tw.utils.stringifyList(oldtags) + " " + this.filtertags, newtags = this.wiki.filterTiddlers(tagfilter,this); if($tw.utils.stringifyList(oldtags.sort()) !== $tw.utils.stringifyList(newtags.sort())) { - this.wiki.setText(this.target,"tags",undefined,$tw.utils.stringifyList(newtags)); + this.wiki.setText(this.target,"tags",undefined,$tw.utils.stringifyList(newtags)); } } return true; // Action was invoked diff --git a/core/modules/widgets/action-log.js b/core/modules/widgets/action-log.js index eacef94bc..fc8412006 100644 --- a/core/modules/widgets/action-log.js +++ b/core/modules/widgets/action-log.js @@ -62,17 +62,17 @@ LogWidget.prototype.log = function() { $tw.utils.each(this.attributes,function(attribute,name) { if(name.substring(0,2) !== "$$") { data[name] = attribute; - } + } }); for(var v in this.variables) { allVars[v] = this.getVariable(v,{defaultValue:""}); - } + } if(this.filter) { filteredVars = this.wiki.compileFilter(this.filter).call(this.wiki,this.wiki.makeTiddlerIterator(allVars)); $tw.utils.each(filteredVars,function(name) { data[name] = allVars[name]; - }); + }); } dataCount = $tw.utils.count(data); diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js index 9186e1808..4b96e6b2b 100644 --- a/core/modules/widgets/button.js +++ b/core/modules/widgets/button.js @@ -227,7 +227,7 @@ ButtonWidget.prototype.execute = function() { ButtonWidget.prototype.updateDomNodeClasses = function() { var domNodeClasses = this.domNode.className.split(" "), oldClasses = this.class.split(" "), - newClasses; + newClasses; this["class"] = this.getAttribute("class",""); newClasses = this.class.split(" "); //Remove classes assigned from the old value of class attribute diff --git a/core/modules/widgets/droppable.js b/core/modules/widgets/droppable.js index c9878930d..104503b25 100644 --- a/core/modules/widgets/droppable.js +++ b/core/modules/widgets/droppable.js @@ -49,7 +49,7 @@ DroppableWidget.prototype.render = function(parent,nextSibling) { {name: "dragover", handlerObject: this, handlerMethod: "handleDragOverEvent"}, {name: "dragleave", handlerObject: this, handlerMethod: "handleDragLeaveEvent"}, {name: "drop", handlerObject: this, handlerMethod: "handleDropEvent"} - ]); + ]); } else { $tw.utils.addClass(this.domNode,this.disabledClass); } @@ -155,7 +155,7 @@ DroppableWidget.prototype.execute = function() { DroppableWidget.prototype.assignDomNodeClasses = function() { var classes = this.getAttribute("class","").split(" "); classes.push("tc-droppable"); - this.domNode.className = classes.join(" "); + this.domNode.className = classes.join(" "); }; /* diff --git a/core/modules/widgets/dropzone.js b/core/modules/widgets/dropzone.js index 9c6a16b20..04b48c5e4 100644 --- a/core/modules/widgets/dropzone.js +++ b/core/modules/widgets/dropzone.js @@ -82,7 +82,7 @@ DropZoneWidget.prototype.resetState = function() { this.currentlyEntered = []; this.document.body.removeEventListener("click",this,true); this.document.body.removeEventListener("dragenter",this,true); - this.document.body.removeEventListener("dragleave",this,true); + this.document.body.removeEventListener("dragleave",this,true); this.dragInProgress = false; }; @@ -93,7 +93,7 @@ DropZoneWidget.prototype.enterDrag = function(event) { if(!this.dragInProgress) { this.dragInProgress = true; // If we're entering for the first time we need to apply highlighting - $tw.utils.addClass(this.domNodes[0],"tc-dragover"); + $tw.utils.addClass(this.domNodes[0],"tc-dragover"); this.document.body.addEventListener("click",this,true); this.document.body.addEventListener("dragenter",this,true); this.document.body.addEventListener("dragleave",this,true); diff --git a/core/modules/widgets/edit-bitmap.js b/core/modules/widgets/edit-bitmap.js index c6c3dde8c..5065127d8 100644 --- a/core/modules/widgets/edit-bitmap.js +++ b/core/modules/widgets/edit-bitmap.js @@ -156,7 +156,7 @@ EditBitmapWidget.prototype.loadCanvas = function() { }; // Get the current bitmap into an image object if(tiddler && tiddler.fields.type && tiddler.fields.text) { - currImage.src = "data:" + tiddler.fields.type + ";base64," + tiddler.fields.text; + currImage.src = "data:" + tiddler.fields.type + ";base64," + tiddler.fields.text; } else { currImage.width = DEFAULT_IMAGE_WIDTH; currImage.height = DEFAULT_IMAGE_HEIGHT; diff --git a/core/modules/widgets/edit-shortcut.js b/core/modules/widgets/edit-shortcut.js index b70328d5a..31d81b6b8 100644 --- a/core/modules/widgets/edit-shortcut.js +++ b/core/modules/widgets/edit-shortcut.js @@ -33,7 +33,7 @@ EditShortcutWidget.prototype.render = function(parent,nextSibling) { this.inputNode = this.document.createElement("input"); // Assign classes if(this.shortcutClass) { - this.inputNode.className = this.shortcutClass; + this.inputNode.className = this.shortcutClass; } // Assign other attributes if(this.shortcutStyle) { @@ -117,7 +117,7 @@ EditShortcutWidget.prototype.handleKeydownEvent = function(event) { // Ignore the keydown if it was already handled event.preventDefault(); event.stopPropagation(); - return true; + return true; } else { return false; } @@ -145,7 +145,7 @@ EditShortcutWidget.prototype.refresh = function(changedTiddlers) { this.updateInputNode(); return true; } else { - return false; + return false; } }; diff --git a/core/modules/widgets/element.js b/core/modules/widgets/element.js index 41ed4ebd1..a46669f43 100755 --- a/core/modules/widgets/element.js +++ b/core/modules/widgets/element.js @@ -81,7 +81,7 @@ ElementWidget.prototype.refresh = function(changedTiddlers) { if(hasChangedAttributes) { if(!this.isReplaced) { // Update our attributes - this.assignAttributes(this.domNodes[0],{excludeEventAttributes: true}); + this.assignAttributes(this.domNodes[0],{excludeEventAttributes: true}); } else { // If we were replaced then completely refresh ourselves return this.refreshSelf(); diff --git a/core/modules/widgets/entity.js b/core/modules/widgets/entity.js index 0b5e68375..6f1a66fed 100755 --- a/core/modules/widgets/entity.js +++ b/core/modules/widgets/entity.js @@ -51,7 +51,7 @@ EntityWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return false; + return false; } }; diff --git a/core/modules/widgets/eventcatcher.js b/core/modules/widgets/eventcatcher.js index 0b32689a1..75f60379a 100644 --- a/core/modules/widgets/eventcatcher.js +++ b/core/modules/widgets/eventcatcher.js @@ -37,11 +37,11 @@ EventWidget.prototype.render = function(parent,nextSibling) { var tag = this.parseTreeNode.isBlock ? "div" : "span"; if(this.elementTag && $tw.config.htmlUnsafeElements.indexOf(this.elementTag) === -1) { tag = this.elementTag; - } + } var domNode = this.document.createElement(tag); this.domNode = domNode; // Assign classes - this.assignDomNodeClasses(); + this.assignDomNodeClasses(); // Add our event handler $tw.utils.each(this.types,function(type) { domNode.addEventListener(type,function(event) { @@ -144,7 +144,7 @@ EventWidget.prototype.execute = function() { EventWidget.prototype.assignDomNodeClasses = function() { var classes = this.getAttribute("class","").split(" "); classes.push("tc-eventcatcher"); - this.domNode.className = classes.join(" "); + this.domNode.className = classes.join(" "); }; /* diff --git a/core/modules/widgets/fieldmangler.js b/core/modules/widgets/fieldmangler.js index fb249cbf2..d0d0782b1 100644 --- a/core/modules/widgets/fieldmangler.js +++ b/core/modules/widgets/fieldmangler.js @@ -58,7 +58,7 @@ FieldManglerWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return this.refreshChildren(changedTiddlers); + return this.refreshChildren(changedTiddlers); } }; @@ -133,7 +133,7 @@ FieldManglerWidget.prototype.handleAddTagEvent = function(event) { if(tag !== "") { modification.tags = (tiddler.fields.tags || []).slice(0); $tw.utils.pushTop(modification.tags,tag); - this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification)); + this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification)); } } else if(typeof event.param === "string" && event.param.trim() !== "" && this.mangleTitle.trim() !== "") { var tag = []; diff --git a/core/modules/widgets/image.js b/core/modules/widgets/image.js index 4ecafbd2b..2975cef4c 100644 --- a/core/modules/widgets/image.js +++ b/core/modules/widgets/image.js @@ -86,7 +86,7 @@ ImageWidget.prototype.render = function(parent,nextSibling) { default: src = _canonical_uri; break; - } + } } else { // Just trigger loading of the tiddler this.wiki.getTiddlerText(this.imageSource); @@ -97,7 +97,7 @@ ImageWidget.prototype.render = function(parent,nextSibling) { var domNode = this.document.createElement(tag); domNode.setAttribute("src",src); if(this.imageClass) { - domNode.setAttribute("class",this.imageClass); + domNode.setAttribute("class",this.imageClass); } if(this.imageWidth) { domNode.setAttribute("width",this.imageWidth); @@ -106,10 +106,10 @@ ImageWidget.prototype.render = function(parent,nextSibling) { domNode.setAttribute("height",this.imageHeight); } if(this.imageTooltip) { - domNode.setAttribute("title",this.imageTooltip); + domNode.setAttribute("title",this.imageTooltip); } if(this.imageAlt) { - domNode.setAttribute("alt",this.imageAlt); + domNode.setAttribute("alt",this.imageAlt); } // Insert element parent.insertBefore(domNode,nextSibling); @@ -138,7 +138,7 @@ ImageWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return false; + return false; } }; diff --git a/core/modules/widgets/importvariables.js b/core/modules/widgets/importvariables.js index 56cc0852c..faa2448de 100644 --- a/core/modules/widgets/importvariables.js +++ b/core/modules/widgets/importvariables.js @@ -118,7 +118,7 @@ ImportVariablesWidget.prototype.refresh = function(changedTiddlers) { this.renderChildren(this.parentDomNode,this.findNextSiblingDomNode()); return true; } else { - return this.refreshChildren(changedTiddlers); + return this.refreshChildren(changedTiddlers); } }; diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index 76822668b..d1742af24 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -77,7 +77,7 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { } } if(this.linkClasses) { - classes.push(this.linkClasses); + classes.push(this.linkClasses); } } else if(this.overrideClasses !== "") { classes.push(this.overrideClasses) diff --git a/core/modules/widgets/linkcatcher.js b/core/modules/widgets/linkcatcher.js index 616a54c32..78322d0f6 100644 --- a/core/modules/widgets/linkcatcher.js +++ b/core/modules/widgets/linkcatcher.js @@ -61,7 +61,7 @@ LinkCatcherWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return this.refreshChildren(changedTiddlers); + return this.refreshChildren(changedTiddlers); } }; diff --git a/core/modules/widgets/log.js b/core/modules/widgets/log.js index 2615547ad..9d6e95159 100644 --- a/core/modules/widgets/log.js +++ b/core/modules/widgets/log.js @@ -23,7 +23,7 @@ exports.constructor = function(parseTreeNode,options) { exports.prototype = {}; exports.prototype.render = function(event) { - Object.getPrototypeOf(Object.getPrototypeOf(this)).render.call(this,event); + Object.getPrototypeOf(Object.getPrototypeOf(this)).render.call(this,event); Object.getPrototypeOf(Object.getPrototypeOf(this)).log.call(this); } diff --git a/core/modules/widgets/macrocall.js b/core/modules/widgets/macrocall.js index 2381d0360..9de2e5d67 100644 --- a/core/modules/widgets/macrocall.js +++ b/core/modules/widgets/macrocall.js @@ -44,7 +44,7 @@ MacroCallWidget.prototype.execute = function() { var params = this.parseTreeNode.params ? this.parseTreeNode.params.slice(0) : []; $tw.utils.each(this.attributes,function(attribute,name) { if(name.charAt(0) !== "$") { - params.push({name: name, value: attribute}); + params.push({name: name, value: attribute}); } }); // Get the macro value diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 75ad59a69..9df76acc4 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -95,7 +95,7 @@ NavigatorWidget.prototype.saveStoryList = function(storyList) { {title: this.storyTitle}, storyTiddler, {list: storyList} - )); + )); } }; @@ -105,7 +105,7 @@ NavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) { while(p !== -1) { storyList.splice(p,1); p = storyList.indexOf(title); - } + } } }; @@ -122,7 +122,7 @@ NavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle } while(pos !== -1); } else { storyList.splice(0,0,newTitle); - } + } } }; diff --git a/core/modules/widgets/raw.js b/core/modules/widgets/raw.js index 6ea592d3e..6d0ac41de 100644 --- a/core/modules/widgets/raw.js +++ b/core/modules/widgets/raw.js @@ -32,7 +32,7 @@ RawWidget.prototype.render = function(parent,nextSibling) { var div = this.document.createElement("div"); div.innerHTML=this.parseTreeNode.html; parent.insertBefore(div,nextSibling); - this.domNodes.push(div); + this.domNodes.push(div); }; /* diff --git a/core/modules/widgets/reveal.js b/core/modules/widgets/reveal.js index 2431e7195..aedca6183 100755 --- a/core/modules/widgets/reveal.js +++ b/core/modules/widgets/reveal.js @@ -72,7 +72,7 @@ RevealWidget.prototype.positionPopup = function(domNode) { case "belowright": left = this.popup.left + this.popup.width; top = this.popup.top + this.popup.height; - break; + break; case "right": left = this.popup.left + this.popup.width; top = this.popup.top; @@ -84,7 +84,7 @@ RevealWidget.prototype.positionPopup = function(domNode) { case "aboveleft": left = this.popup.left - domNode.offsetWidth; top = this.popup.top - domNode.offsetHeight; - break; + break; default: // Below left = this.popup.left; top = this.popup.top + this.popup.height; @@ -234,7 +234,7 @@ RevealWidget.prototype.refresh = function(changedTiddlers) { } if(changedAttributes["class"]) { this.assignDomNodeClasses(); - } + } return this.refreshChildren(changedTiddlers); } }; diff --git a/core/modules/widgets/scrollable.js b/core/modules/widgets/scrollable.js index 23be39efd..ddce42351 100644 --- a/core/modules/widgets/scrollable.js +++ b/core/modules/widgets/scrollable.js @@ -41,7 +41,7 @@ ScrollableWidget.prototype.handleScrollEvent = function(event) { if(event.paramObject && event.paramObject.selector) { this.scrollSelectorIntoView(null,event.paramObject.selector); } else { - this.scrollIntoView(event.target); + this.scrollIntoView(event.target); } return false; // Handled event }; @@ -97,7 +97,7 @@ ScrollableWidget.prototype.scrollIntoView = function(element) { if(duration <= 0) { t = 1; } else { - t = ((Date.now()) - self.startTime) / duration; + t = ((Date.now()) - self.startTime) / duration; } if(t >= 1) { self.cancelScroll(); @@ -118,7 +118,7 @@ ScrollableWidget.prototype.scrollSelectorIntoView = function(baseElement,selecto baseElement = baseElement || document.body; var element = baseElement.querySelector(selector); if(element) { - this.scrollIntoView(element,callback); + this.scrollIntoView(element,callback); } }; diff --git a/core/modules/widgets/setvariable.js b/core/modules/widgets/setvariable.js index 40dbadf16..cc97067c7 100755 --- a/core/modules/widgets/setvariable.js +++ b/core/modules/widgets/setvariable.js @@ -63,7 +63,7 @@ SetWidget.prototype.getValue = function() { if(this.setSubTiddler) { tiddler = this.wiki.getSubTiddler(this.setTiddler,this.setSubTiddler); } else { - tiddler = this.wiki.getTiddler(this.setTiddler); + tiddler = this.wiki.getTiddler(this.setTiddler); } if(!tiddler) { value = this.setEmptyValue; @@ -84,7 +84,7 @@ SetWidget.prototype.getValue = function() { if(select !== undefined) { value = results[select] || ""; } else { - value = $tw.utils.stringifyList(results); + value = $tw.utils.stringifyList(results); } } if(results.length === 0 && this.setEmptyValue !== undefined) { diff --git a/core/modules/widgets/text.js b/core/modules/widgets/text.js index e3212f590..14f729114 100755 --- a/core/modules/widgets/text.js +++ b/core/modules/widgets/text.js @@ -53,7 +53,7 @@ TextNodeWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return false; + return false; } }; diff --git a/core/modules/widgets/tiddler.js b/core/modules/widgets/tiddler.js index 1296a5b09..0b70ff875 100755 --- a/core/modules/widgets/tiddler.js +++ b/core/modules/widgets/tiddler.js @@ -92,7 +92,7 @@ TiddlerWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return this.refreshChildren(changedTiddlers); + return this.refreshChildren(changedTiddlers); } }; diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 1af7f9c42..2acd8109b 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -107,7 +107,7 @@ TranscludeWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return this.refreshChildren(changedTiddlers); + return this.refreshChildren(changedTiddlers); } }; diff --git a/core/modules/widgets/vars.js b/core/modules/widgets/vars.js index cbd3e0ddc..e4ee8872f 100644 --- a/core/modules/widgets/vars.js +++ b/core/modules/widgets/vars.js @@ -22,7 +22,7 @@ This widget allows multiple variables to be set in one go: var Widget = require("$:/core/modules/widgets/widget.js").widget; var VarsWidget = function(parseTreeNode,options) { - // Initialise + // Initialise this.initialise(parseTreeNode,options); }; diff --git a/core/modules/widgets/view.js b/core/modules/widgets/view.js index fed369771..6effc8939 100755 --- a/core/modules/widgets/view.js +++ b/core/modules/widgets/view.js @@ -108,7 +108,7 @@ ViewWidget.prototype.getValue = function(options) { } else { var tiddler; if(this.viewSubtiddler) { - tiddler = this.wiki.getSubTiddler(this.viewTitle,this.viewSubtiddler); + tiddler = this.wiki.getSubTiddler(this.viewTitle,this.viewSubtiddler); } else { tiddler = this.wiki.getTiddler(this.viewTitle); } @@ -121,7 +121,7 @@ ViewWidget.prototype.getValue = function(options) { if(options.asString) { value = tiddler.getFieldString(this.viewField); } else { - value = tiddler.fields[this.viewField]; + value = tiddler.fields[this.viewField]; } } } @@ -219,7 +219,7 @@ ViewWidget.prototype.refresh = function(changedTiddlers) { this.refreshSelf(); return true; } else { - return false; + return false; } }; diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 50405c19c..ce0102069 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -122,7 +122,7 @@ Widget.prototype.getVariableInfo = function(name,options) { }); // Only substitute variable references if this variable was defined with the \define pragma if(variable.isMacroDefinition) { - value = this.substituteVariableReferences(value); + value = this.substituteVariableReferences(value); } return { text: value, diff --git a/core/modules/widgets/wikify.js b/core/modules/widgets/wikify.js index 853ebff1b..1830b2048 100644 --- a/core/modules/widgets/wikify.js +++ b/core/modules/widgets/wikify.js @@ -100,7 +100,7 @@ WikifyWidget.prototype.getWidgetTree = function() { break; case "text": resultNode.text = widgetNode.parseTreeNode.text; - break; + break; } if(Object.keys(widgetNode.attributes || {}).length > 0) { resultNode.attributes = {}; diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 0fcb9b7b0..072b76dbf 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -111,7 +111,7 @@ exports.deleteTextReference = function(textRef,currTiddlerTitle) { exports.addEventListener = function(type,listener) { this.eventListeners = this.eventListeners || {}; this.eventListeners[type] = this.eventListeners[type] || []; - this.eventListeners[type].push(listener); + this.eventListeners[type].push(listener); }; exports.removeEventListener = function(type,listener) { @@ -227,7 +227,7 @@ exports.isVolatileTiddler = function(title) { exports.isImageTiddler = function(title) { var tiddler = this.getTiddler(title); - if(tiddler) { + if(tiddler) { var contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || "text/vnd.tiddlywiki"]; return !!contentTypeInfo && contentTypeInfo.flags.indexOf("image") !== -1; } else { @@ -237,7 +237,7 @@ exports.isImageTiddler = function(title) { exports.isBinaryTiddler = function(title) { var tiddler = this.getTiddler(title); - if(tiddler) { + if(tiddler) { var contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || "text/vnd.tiddlywiki"]; return !!contentTypeInfo && contentTypeInfo.encoding === "base64"; } else { @@ -734,7 +734,7 @@ exports.getTiddlerDataCached = function(titleOrTiddler,defaultData) { var self = this, tiddler = titleOrTiddler; if(!(tiddler instanceof $tw.Tiddler)) { - tiddler = this.getTiddler(tiddler); + tiddler = this.getTiddler(tiddler); } if(tiddler) { return this.getCacheForTiddler(tiddler.fields.title,"data",function() { @@ -755,7 +755,7 @@ exports.getTiddlerData = function(titleOrTiddler,defaultData) { var tiddler = titleOrTiddler, data; if(!(tiddler instanceof $tw.Tiddler)) { - tiddler = this.getTiddler(tiddler); + tiddler = this.getTiddler(tiddler); } if(tiddler && tiddler.fields.text) { switch(tiddler.fields.type) { @@ -885,7 +885,7 @@ exports.initParsers = function(moduleType) { if(!$tw.utils.hop($tw.Wiki.parsers,type) && $tw.config.contentTypeInfo[type].encoding === "base64") { $tw.Wiki.parsers[type] = $tw.Wiki.parsers["application/octet-stream"]; } - }); + }); } }; @@ -949,7 +949,7 @@ exports.parseTextReference = function(title,field,index,options) { } if(field === "text" || (!field && !index)) { if(tiddler && tiddler.fields) { - return this.parseText(tiddler.fields.type,tiddler.fields.text,options); + return this.parseText(tiddler.fields.type,tiddler.fields.text,options); } else { return null; } @@ -1157,7 +1157,7 @@ exports.search = function(text,options) { searchTermsRegExps = [new RegExp("(" + anchor + terms.join("\\s+") + ")",flags)]; } else if(options.regexp) { try { - searchTermsRegExps = [new RegExp("(" + text + ")",flags)]; + searchTermsRegExps = [new RegExp("(" + text + ")",flags)]; } catch(e) { searchTermsRegExps = null; console.log("Regexp error parsing /(" + text + ")/" + flags + ": ",e); @@ -1179,7 +1179,7 @@ exports.search = function(text,options) { if($tw.utils.isArray(options.field)) { $tw.utils.each(options.field,function(fieldName) { if(fieldName) { - fields.push(fieldName); + fields.push(fieldName); } }); } else { @@ -1448,7 +1448,7 @@ historyTitle: title of history tiddler (defaults to $:/HistoryList) */ exports.addToHistory = function(title,fromPageRect,historyTitle) { var story = new $tw.Story({wiki: this, historyTitle: historyTitle}); - story.addToHistory(title,fromPageRect); + story.addToHistory(title,fromPageRect); console.log("$tw.wiki.addToHistory() is deprecated since V5.1.23! Use the this.story.addToHistory() from the story-object!") };