This report was build with JSLint, the JavaScript Verifier. JSLint is a JavaScript program that looks for problems in other JavaScript programs.
Here is the list of files in this report:
Lint at line 17 character 12: 'AG' is not defined. if (typeof AG === "undefined") { Lint at line 18 character 12: 'AG' was used before it was defined. var AG = {}; Lint at line 114 character 21: Too many var statements. var v = arguments[1];
Lint at line 18 character 21: Expected '{' and instead saw 'uri'. while (i--) uri[o.key[i]] = m[i] || ""; Lint at line 22 character 21: Expected '{' and instead saw 'uri'. if ($1) uri[o.q.name][$1] = $2; Lint at line 26 character 6: Unnecessary semicolon. };
Lint at line 57 character 3: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype. for (var name in gadget.getUserPrefs()) {
No problems found
Lint at line 91 character 43: The Function constructor is eval. this.functionScript = new Function('$data', this.header + this.functionText + this.footer); Lint at line 123 character 9: Expected '{' and instead saw 'return'. return ZParse.clean(this.functionScript.apply(bind, [data])); Lint at line 125 character 9: Expected '{' and instead saw 'return'. return ZParse.clean(this.functionScript(data)); Lint at line 145 character 13: Expected '{' and instead saw 'source'. source = source.replace(new RegExp(list[i][0],'gi'), list[i][1]); Lint at line 147 character 13: Expected '{' and instead saw 'source'. source = source.replace(new RegExp('\\'+list[i],'gi'), '\\'+list[i]); Lint at line 183 character 17: Expected '{' and instead saw 'delimiter'. delimiter = i; Lint at line 185 character 17: Expected '{' and instead saw 'if'. if(source.indexOf(imp[delimiter].opener) > source.indexOf(imp[i].opener)) Lint at line 186 character 21: Expected '{' and instead saw 'delimiter'. delimiter = i; Lint at line 181 character 9: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype. for(var i in imp) { Lint at line 202 character 14: 'i' is already defined. for(var i=0; i',
Lint at line 12 character 23: Use '===' to compare with 'null'. if (value == null) { Lint at line 37 character 23: Use '===' to compare with 'null'. if (start == null) { Lint at line 51 character 23: Use '===' to compare with 'null'. if (value == null) { Lint at line 70 character 23: Use '===' to compare with 'null'. if (start == null) {
Lint at line 14 character 1: 'AG' is not defined. AG = {}; // set namespace Lint at line 17 character 1: 'AG' is not defined. AG.DashboardManager = (function () { Lint at line 45 character 22: 'AG' is not defined. descriptor = AG.render.getDescriptor("dashboardMenu", json); Lint at line 48 character 35: 'AG' is not defined. dashboard.contents.append(AG.render(descriptor)); Lint at line 57 character 13: 'AG' is not defined. AG.DashboardManager.editLayout(); Lint at line 139 character 22: 'AG' is not defined. layout = AG.LayoutManager(descriptor); Lint at line 142 character 17: Expected 'layouts' to have an indentation of 12 instead of 16. layouts.push(layout); Lint at line 144 character 17: Expected 'if' to have an indentation of 12 instead of 16. if (descriptor.active !== false) { Lint at line 146 character 21: Expected 'this' to have an indentation of 16 instead of 20. this.setLayout(layout); Lint at line 147 character 17: Expected '}' to have an indentation of 12 instead of 16. } Lint at line 149 character 17: Expected 'layout' to have an indentation of 12 instead of 16. layout.init(); Lint at line 169 character 32: Missing space after 'function'. doDiagnostics: function() { Lint at line 172 character 23: 'AG' is not defined. url : AG.param.get("dashboardDiagnosticsUrl"), Lint at line 176 character 32: Missing space after 'function'. error: function(request) { Lint at line 177 character 40: Expected '===' and instead saw '=='. if (request.status == 500) { Lint at line 178 character 25: 'diagnosticsErrorDisplay' is not defined. diagnosticsErrorDisplay(request); Lint at line 181 character 34: Missing space after 'function'. success: function(data) { Lint at line 187 character 51: Missing space after 'function'. var diagnosticsErrorDisplay = function(request) { Lint at line 192 character 21: Too many var statements. var learnMoreText = "Click here to learn more"; Lint at line 193 character 21: Too many var statements. var diagnosticsContentDiv = AJS.$("#diagnostic-content", diagnosticsWarningDiv); Lint at line 194 character 21: Too many var statements. var learnMoreLink = AJS.$("#learn-more-link", diagnosticsWarningDiv); Lint at line 195 character 21: Too many var statements. var displayErrorLink = AJS.$("#display-error-link", diagnosticsWarningDiv); Lint at line 196 character 21: Too many var statements. var stackTraceDiv = AJS.$("#error-stack-trace", diagnosticsWarningDiv); Lint at line 198 character 21: Too many var statements. var closeWarning = function() { Lint at line 198 character 44: Missing space after 'function'. var closeWarning = function() { Lint at line 203 character 30: 'AG' is not defined. url: AG.param.get("dashboardDiagnosticsUrl"), Lint at line 210 character 21: Too many var statements. var setToggleDetails = function(link, detailDiv) { Lint at line 210 character 48: Missing space after 'function'. var setToggleDetails = function(link, detailDiv) { Lint at line 211 character 40: Missing space after 'function'. link.click(function(){ Lint at line 211 character 42: Missing space after ')'. link.click(function(){ Lint at line 212 character 41: Expected '===' and instead saw '=='. if (link.text() == "Hide") { Lint at line 227 character 67: Missing space after 'function'. AJS.$("#diagnostic-warning .close").click(function() { Lint at line 249 character 26: 'AG' is not defined. descriptor = AG.render.getDescriptor("layoutDialog", { Lint at line 250 character 29: 'AG' is not defined. layoutType: AG.DashboardManager.getLayout().getLayout() Lint at line 259 character 27: 'AG' is not defined. .html(AG.render(descriptor)) Lint at line 260 character 31: 'AG' is not defined. .addClass(AG.LayoutManager.getLayoutAttrName(descriptor.layoutType)); Lint at line 273 character 24: 'AG' is not defined. AJS.$.each(AG.LayoutManager.layouts, function () { Lint at line 276 character 34: 'AG' is not defined. layoutAttrName = AG.LayoutManager.getLayoutAttrName(layout); Lint at line 281 character 40: 'AG' is not defined. var activeLayout = AG.DashboardManager.getLayout(); Lint at line 286 character 42: 'AG' is not defined. .removeClass(AG.LayoutManager.getLayoutAttrName(activeLayout.getLayout())) Lint at line 293 character 21: 'AG' is not defined. AG.Sortable.update(); Lint at line 403 character 38: 'gadgets' is not defined. AJS.$.aop.after({target: gadgets.IfrGadgetService.prototype, method: "setHeight"}, function () { Lint at line 410 character 13: 'AG' is not defined. AG.param.set(options.params); Lint at line 412 character 13: 'AG' is not defined. AG.render.ready(function () { Lint at line 416 character 21: 'AG' is not defined. AG.Sortable.init(); Lint at line 430 character 24: Missing space after 'if'. if(options.menu.items && options.menu.items.length > 0) { Lint at line 445 character 21: 'window' is not defined. window.setTimeout(function() { Lint at line 445 character 47: Missing space after 'function'. window.setTimeout(function() { Lint at line 446 character 25: 'window' is not defined. window.location.reload(); Lint at line 453 character 13: 'AG' is not defined. AG.render.initialize(); Lint at line 453 character 13: Too many errors. (98% scanned).
Lint at line 24 character 17: Bad line breaking before '+'. + ""); Lint at line 63 character 30: Use '===' to compare with ''. if (this == "") { Lint at line 100 character 26: Be careful when making functions within a loop. Consider putting the function in a closure. }); Lint at line 108 character 70: Use '===' to compare with '0'. if (AJS.$("ul.faux-list", this.container).length == 0) { Lint at line 173 character 32: Missing radix parameter. if (!isNaN(parseInt(height))) { Lint at line 251 character 41: Expected '{' and instead saw 'that'. if (that.minimized) that.maximize(); Lint at line 252 character 26: Expected '{' and instead saw 'that'. else that.minimize(); Lint at line 255 character 45: Expected '{' and instead saw 'that'. if (that.minimized) that.maximize(); Lint at line 256 character 30: Expected '{' and instead saw 'that'. else that.minimize(); Lint at line 377 character 39: Expected a conditional expression and instead saw an assignment. if (pref_name = arguments[i]) { Lint at line 798 character 25: Bad line breaking before '+'. + "either 'default' or 'canvas'");
No problems found
Lint at line 61 character 40: Expected '===' and instead saw '=='. if (request.status == 403 || request.status == 401) { Lint at line 61 character 65: Expected '===' and instead saw '=='. if (request.status == 403 || request.status == 401) { Lint at line 218 character 79: 'jQuery' is not defined. var that = this, isIE6OrBelow = !!(AJS.$.browser.msie && parseInt(jQuery.browser.version) <= 6); Lint at line 218 character 70: Missing radix parameter. var that = this, isIE6OrBelow = !!(AJS.$.browser.msie && parseInt(jQuery.browser.version) <= 6); Lint at line 285 character 33: Unexpected space after 'hideGadget'. function hideGadget () { Lint at line 291 character 33: Unexpected space after 'showGadget'. function showGadget () { Lint at line 298 character 34: Unexpected space after 'validateAdd'. function validateAdd (numGadgets) { Lint at line 299 character 21: Missing radix parameter. if (parseInt(numGadgets) >= AG.param.get("maxGadgets")) { Lint at line 307 character 37: Unexpected space after 'appendToColumn'. function appendToColumn () { Lint at line 316 character 44: Unexpected space after 'isFromDifferentLayout'. function isFromDifferentLayout () { Lint at line 320 character 46: Unexpected space after 'ensureIframeDoesntCache'. function ensureIframeDoesntCache () { Lint at line 352 character 14: Unnecessary semicolon. }; Lint at line 457 character 52: Unexpected space after 'getCanvasGadgetRepresentation'. function getCanvasGadgetRepresentation (gadgets) { Lint at line 459 character 18: Expected 'AJS' to have an indentation of 16 instead of 17. AJS.$.each(that.options.gadgets, function () { Lint at line 490 character 32: Unexpected space after 'appendTab'. function appendTab () { Lint at line 512 character 32: Missing radix parameter. parseInt(labelStrong.css('padding-left')) - Lint at line 513 character 32: Missing radix parameter. parseInt(labelStrong.css('padding-right')); Lint at line 518 character 20: Missing space after 'if'. if(that.isWritable() && that.options.active === false) { Lint at line 525 character 36: Unexpected space after 'appendColumns'. function appendColumns () { Lint at line 533 character 36: Unexpected space after 'appendGadgets'. function appendGadgets () { Lint at line 539 character 37: Unexpected space after 'setInitialized'. function setInitialized () {
Lint at line 83 character 48: Use '!==' to compare with ''. if (document.cookie && document.cookie != '') {
Lint at line 66 character 20: 'button' is already defined. var button = $(button); Lint at line 78 character 20: 'button' is already defined. var button = $(button); Lint at line 102 character 20: 'button' is already defined. var button = $(button); Lint at line 122 character 24: Use the array literal notation []. urls = new Array(urls); Lint at line 132 character 40: Use '!==' to compare with ''. if ($('#add-gadget-url').val() != "") { Lint at line 177 character 58: Use '!==' to compare with ''. if ($('#add-gadget-feed-subscription-url').val() != "") { Lint at line 250 character 49: Missing semicolon. .text(this.name) Lint at line 318 character 27: Missing semicolon. highlight(gadgets) Lint at line 347 character 56: Use '!==' to compare with ''. if (gadget.thumbnailUri && gadget.thumbnailUri != "") { Lint at line 351 character 54: Use '!==' to compare with ''. if (gadget.description && gadget.description != "") { Lint at line 357 character 52: Use '!==' to compare with ''. if (gadget.authorName && gadget.authorName != "") { Lint at line 366 character 48: Use '!==' to compare with ''. if (gadget.titleUri && gadget.titleUri != "") { Lint at line 374 character 49: Bad line breaking before '+'. + gadget.gadgetSpecUri); Lint at line 531 character 35: Use '===' to compare with ''. if (searchInput.val() == "") { Lint at line 605 character 71: ['all'] is better written in dot notation. mb.page[0].addPanel(AG.param.get("all") + " (" + categoryDivs["all"].children().length + ")", categoryDivs["all"]); Lint at line 605 character 116: ['all'] is better written in dot notation. mb.page[0].addPanel(AG.param.get("all") + " (" + categoryDivs["all"].children().length + ")", categoryDivs["all"]);
Lint at line 34 character 69: Unescaped '}'. var matches = template.match(/(?:\$[\W]*)(\w+)(?:\s*\([^\}]+})/gi); Lint at line 133 character 18: Unnecessary semicolon. }; Lint at line 137 character 18: Unnecessary semicolon. };
Lint at line 88 character 25: Use '===' to compare with '0'. } else if (opt_maxAge == 0) { Lint at line 97 character 40: Missing '()' invoking a constructor. var futureDate = new Date((new Date).getTime() + opt_maxAge * 1000); Lint at line 168 character 24: Expected a conditional expression and instead saw an assignment. for (var i = 0; part = parts[i]; i++) { Lint at line 206 character 26: Use '===' to compare with ''. return document.cookie == ''; Lint at line 216 character 14: Use '===' to compare with ''. if (cookie == '') {
Lint at line 14 character 24: Use '===' to compare with 'null'. if(cookieValue == null) { Lint at line 25 character 34: Use '===' to compare with '0'. if (cp.indexOf(name) == 0) { Lint at line 37 character 24: Use '===' to compare with 'null'. if(cookieValue == null) { Lint at line 46 character 19: Use '!==' to compare with ''. if(cp != "") { Lint at line 51 character 38: Use '!==' to compare with '0'. if (cp.indexOf(name) != 0) { Lint at line 58 character 18: Use '!==' to compare with 'null'. if(value != null && value != '') { Lint at line 58 character 35: Use '!==' to compare with ''. if(value != null && value != '') { Lint at line 77 character 31: Use '===' to compare with '0'. if (c.indexOf(eq) == 0) { Lint at line 107 character 22: Use '!==' to compare with 'null'. if(value != null) {
No problems found
Lint at line 43 character 23: Use '===' to compare with '0'. if (--pending == 0) { Lint at line 47 character 6: Be careful when making functions within a loop. Consider putting the function in a closure. };