Overview

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:

ajs.parseUri.js

Lint at line 21 character 21: Expected '{' and instead saw 'uri'.
while (i--) uri[o.key[i]] = m[i] || "";

Lint at line 25 character 21: Expected '{' and instead saw 'uri'.
if ($1) uri[o.q.name][unesc($1)] = unesc($2);

Lint at line 29 character 6: Unnecessary semicolon.
};

AG.Gadget.js

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 386 character 39: Expected a conditional expression and instead saw an assignment.
if (pref_name = arguments[i]) {

Lint at line 812 character 25: Bad line breaking before '+'.
+ "either 'default' or 'canvas'");

Lint at line 898 character 83: ['st'] is better written in dot notation.
this.securityToken = AJS.parseUri(options.renderedGadgetUrl).queryKey["st"];

json.js

No problems found

gadgets-dashboard.js

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.
};

ajs.clone.js

No problems found

AG.Param.js

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 63 character 20: Missing space after 'if'.
if(AJS.debug) {

Lint at line 111 character 21: Too many var statements.
var v = arguments[1];

Lint at line 115 character 25: Missing space after 'if'.
else if(AJS.debug) {

Lint at line 128 character 21: Missing space after 'if'.
else if(AJS.debug) {

Lint at line 136 character 16: Missing space after 'if'.
if(AJS.debug) {

Lint at line 137 character 15: Expected 'strs' to have an indentation of 16 instead of 14.
strs = {};

AG.Sortable.js

No problems found

AG.DashboardManager.js

Lint at line 15 character 11: Missing space after 'debug'.
AJS.debug=true;

Lint at line 15 character 11: Missing space after '='.
AJS.debug=true;

Lint at line 19 character 1: 'AG' is not defined.
AG = {}; // set namespace

Lint at line 22 character 1: 'AG' is not defined.
AG.DashboardManager = (function () {

Lint at line 50 character 22: 'AG' is not defined.
descriptor = AG.render.getDescriptor("dashboardMenu", json);

Lint at line 53 character 35: 'AG' is not defined.
dashboard.contents.append(AG.render(descriptor));

Lint at line 62 character 13: 'AG' is not defined.
AG.DashboardManager.editLayout();

Lint at line 144 character 22: 'AG' is not defined.
layout = AG.LayoutManager(descriptor);

Lint at line 147 character 17: Expected 'layouts' to have an indentation of 12 instead of 16.
layouts.push(layout);

Lint at line 149 character 17: Expected 'if' to have an indentation of 12 instead of 16.
if (descriptor.active !== false) {

Lint at line 151 character 21: Expected 'this' to have an indentation of 16 instead of 20.
this.setLayout(layout);

Lint at line 152 character 17: Expected '}' to have an indentation of 12 instead of 16.
}

Lint at line 154 character 17: Expected 'layout' to have an indentation of 12 instead of 16.
layout.init();

Lint at line 174 character 32: Missing space after 'function'.
doDiagnostics: function() {

Lint at line 177 character 23: 'AG' is not defined.
url : AG.param.get("dashboardDiagnosticsUrl"),

Lint at line 181 character 32: Missing space after 'function'.
error: function(request) {

Lint at line 182 character 40: Expected '===' and instead saw '=='.
if (request.status == 500) {

Lint at line 183 character 25: 'diagnosticsErrorDisplay' is not defined.
diagnosticsErrorDisplay(request);

Lint at line 186 character 34: Missing space after 'function'.
success: function(data) {

Lint at line 192 character 51: Missing space after 'function'.
var diagnosticsErrorDisplay = function(request) {

Lint at line 197 character 21: Too many var statements.
var learnMoreText = "Click here to learn more";

Lint at line 198 character 21: Too many var statements.
var diagnosticsContentDiv = AJS.$("#diagnostic-content", diagnosticsWarningDiv);

Lint at line 199 character 21: Too many var statements.
var learnMoreLink = AJS.$("#learn-more-link", diagnosticsWarningDiv);

Lint at line 200 character 21: Too many var statements.
var displayErrorLink = AJS.$("#display-error-link", diagnosticsWarningDiv);

Lint at line 201 character 21: Too many var statements.
var stackTraceDiv = AJS.$("#error-stack-trace", diagnosticsWarningDiv);

Lint at line 203 character 21: Too many var statements.
var closeWarning = function() {

Lint at line 203 character 44: Missing space after 'function'.
var closeWarning = function() {

Lint at line 208 character 30: 'AG' is not defined.
url: AG.param.get("dashboardDiagnosticsUrl"),

Lint at line 215 character 21: Too many var statements.
var setToggleDetails = function(link, detailDiv) {

Lint at line 215 character 48: Missing space after 'function'.
var setToggleDetails = function(link, detailDiv) {

Lint at line 216 character 40: Missing space after 'function'.
link.click(function(){

Lint at line 216 character 42: Missing space after ')'.
link.click(function(){

Lint at line 217 character 41: Expected '===' and instead saw '=='.
if (link.text() == "Hide") {

Lint at line 232 character 67: Missing space after 'function'.
AJS.$("#diagnostic-warning .close").click(function() {

Lint at line 254 character 26: 'AG' is not defined.
descriptor = AG.render.getDescriptor("layoutDialog", {

Lint at line 255 character 29: 'AG' is not defined.
layoutType: AG.DashboardManager.getLayout().getLayout()

Lint at line 264 character 27: 'AG' is not defined.
.html(AG.render(descriptor))

Lint at line 265 character 31: 'AG' is not defined.
.addClass(AG.LayoutManager.getLayoutAttrName(descriptor.layoutType)).addClass("aui-dialog");

Lint at line 278 character 24: 'AG' is not defined.
AJS.$.each(AG.LayoutManager.layouts, function () {

Lint at line 281 character 34: 'AG' is not defined.
layoutAttrName = AG.LayoutManager.getLayoutAttrName(layout);

Lint at line 286 character 40: 'AG' is not defined.
var activeLayout = AG.DashboardManager.getLayout();

Lint at line 291 character 42: 'AG' is not defined.
.removeClass(AG.LayoutManager.getLayoutAttrName(activeLayout.getLayout()))

Lint at line 298 character 21: 'AG' is not defined.
AG.Sortable.update();

Lint at line 403 character 86: ['__st_refresh'] is better written in dot notation.
securityTokenRefreshRate = AJS.parseUri(document.location.href).queryKey["__st_refresh"] || 1000*60*12;

Lint at line 403 character 110: Missing space after '1000'.
securityTokenRefreshRate = AJS.parseUri(document.location.href).queryKey["__st_refresh"] || 1000*60*12;

Lint at line 403 character 110: Missing space after '*'.
securityTokenRefreshRate = AJS.parseUri(document.location.href).queryKey["__st_refresh"] || 1000*60*12;

Lint at line 403 character 113: Missing space after '60'.
securityTokenRefreshRate = AJS.parseUri(document.location.href).queryKey["__st_refresh"] || 1000*60*12;

Lint at line 403 character 113: Missing space after '*'.
securityTokenRefreshRate = AJS.parseUri(document.location.href).queryKey["__st_refresh"] || 1000*60*12;

Lint at line 405 character 54: Missing space after 'function'.
console.debug = console.debug || function() {};

Lint at line 409 character 38: 'gadgets' is not defined.
AJS.$.aop.after({target: gadgets.IfrGadgetService.prototype, method: "setHeight"}, function () {

Lint at line 409 character 38: Too many errors. (80% scanned).


jquery.selection.js

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) {

cookies.js

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 == '') {

AG.Cookie.js

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) {

AG.Render.js

Lint at line 34 character 69: Unescaped '}'.
var matches = template.match(/(?:\$[\W]*)(\w+)(?:\s*\([^\}]+})/gi);

Lint at line 129 character 18: Unnecessary semicolon.
};

Lint at line 133 character 18: Unnecessary semicolon.
};

atl-browser.js

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 362 character 56: Use '!==' to compare with ''.
if (gadget.thumbnailUri && gadget.thumbnailUri != "") {

Lint at line 366 character 54: Use '!==' to compare with ''.
if (gadget.description && gadget.description != "") {

Lint at line 372 character 52: Use '!==' to compare with ''.
if (gadget.authorName && gadget.authorName != "") {

Lint at line 381 character 48: Use '!==' to compare with ''.
if (gadget.titleUri && gadget.titleUri != "") {

Lint at line 389 character 13: Bad line breaking before '+'.
+ gadget.gadgetSpecUri;

Lint at line 551 character 35: Use '===' to compare with ''.
if (searchInput.val() == "") {

Lint at line 618 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 618 character 116: ['all'] is better written in dot notation.
mb.page[0].addPanel(AG.param.get("all") + " (" + categoryDivs["all"].children().length + ")", categoryDivs["all"]);

zparse.js

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',

jquery.cookie.js

Lint at line 83 character 48: Use '!==' to compare with ''.
if (document.cookie && document.cookie != '') {

AG.LayoutManager.js

Lint at line 53 character 37: Missing space after 'function'.
beforeSend: function(xhr) {

Lint at line 58 character 24: Missing space after 'if'.
if(AJS.debug) {

Lint at line 65 character 40: Expected '===' and instead saw '=='.
if (request.status == 403 || request.status == 401) {

Lint at line 65 character 65: Expected '===' and instead saw '=='.
if (request.status == 403 || request.status == 401) {

Lint at line 71 character 24: Missing space after 'if'.
if(AJS.debug) {

Lint at line 90 character 21: Missing space after 'if'.
else if(AJS.debug) {

Lint at line 110 character 20: Missing space after 'if'.
if(AJS.debug) {

Lint at line 119 character 20: Missing space after 'if'.
if(AJS.debug) {

Lint at line 129 character 20: Missing space after 'if'.
if(AJS.debug) {

Lint at line 179 character 21: Missing space after 'if'.
else if(AJS.debug) {

Lint at line 217 character 79: 'jQuery' is not defined.
var that = this, isIE6OrBelow = !!(AJS.$.browser.msie && parseInt(jQuery.browser.version) <= 6);

Lint at line 217 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 321 character 67: Missing space after 'function'.
AJS.$("iframe", gadget.getElement()).each(function() {

Lint at line 334 character 67: Expected '===' and instead saw '=='.
if (gadget.renderedGadgetUrl.indexOf("#rpctoken") == -1) {

Lint at line 352 character 17: 'gadgets' is not defined.
gadgets.rpc.setAuthToken(gadget.getElement().find("iframe").attr("id"), rpctoken);

Lint at line 469 character 52: Unexpected space after 'getCanvasGadgetRepresentation'.
function getCanvasGadgetRepresentation (gadgets) {

Lint at line 471 character 18: Expected 'AJS' to have an indentation of 16 instead of 17.
AJS.$.each(that.options.gadgets, function () {

Lint at line 502 character 32: Unexpected space after 'appendTab'.
function appendTab () {

Lint at line 523 character 32: Missing radix parameter.
parseInt(labelStrong.css('padding-left')) -

Lint at line 524 character 32: Missing radix parameter.
parseInt(labelStrong.css('padding-right'));

Lint at line 529 character 20: Missing space after 'if'.
if(that.isWritable() && that.options.active === false) {

Lint at line 536 character 36: Unexpected space after 'appendColumns'.
function appendColumns () {

Lint at line 544 character 36: Unexpected space after 'appendGadgets'.
function appendGadgets () {

Lint at line 550 character 37: Unexpected space after 'setInitialized'.
function setInitialized () {

effects.js

Lint at line 10 character 1: Unnecessary semicolon.
;jQuery.effects || (function($) {

Lint at line 48 character 17: Expected '{' and instead saw 'return'.
return color;

Lint at line 51 character 20: Expected a conditional expression and instead saw an assignment.
if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))

Lint at line 52 character 17: Expected '{' and instead saw 'return'.
return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];

Lint at line 55 character 20: Expected a conditional expression and instead saw an assignment.
if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))

Lint at line 56 character 17: Expected '{' and instead saw 'return'.
return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];

Lint at line 59 character 20: Expected a conditional expression and instead saw an assignment.
if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))

Lint at line 60 character 17: Expected '{' and instead saw 'return'.
return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];

Lint at line 63 character 20: Expected a conditional expression and instead saw an assignment.
if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))

Lint at line 64 character 17: Expected '{' and instead saw 'return'.
return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];

Lint at line 67 character 20: Expected a conditional expression and instead saw an assignment.
if (result = /rgba\(0, 0, 0, 0\)/.exec(color))

Lint at line 68 character 17: Expected '{' and instead saw 'return'.
return colors['transparent'];

Lint at line 68 character 31: ['transparent'] is better written in dot notation.
return colors['transparent'];

Lint at line 81 character 28: Use '!==' to compare with ''.
if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )

Lint at line 82 character 25: Expected '{' and instead saw 'break'.
break;

Lint at line 85 character 24: Expected a conditional expression and instead saw an assignment.
} while ( elem = elem.parentNode );

Lint at line 88 character 2: Unnecessary semicolon.
};

Lint at line 162 character 13: Bad line breaking before '?'.
? document.defaultView.getComputedStyle(this, null)

Lint at line 176 character 18: Be careful when making functions within a loop. Consider putting the function in a closure.
});

Lint at line 197 character 19: Use '===' to compare with 'null'.
value == null ||

Lint at line 193 character 5: The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
for (name in styles) {

Lint at line 309 character 33: Expected '{' and instead saw 'element'.
if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);

Lint at line 316 character 33: Expected '{' and instead saw 'element'.
if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));

Lint at line 321 character 31: Expected '{' and instead saw 'mode'.
if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle

Lint at line 333 character 10: Unnecessary semicolon.
};

Lint at line 339 character 10: Unnecessary semicolon.
};

Lint at line 393 character 13: Expected '{' and instead saw 'return'.
return element.parent().replaceWith(element);

Lint at line 401 character 30: Expected '{' and instead saw 'value'.
if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];

Lint at line 431 character 9: Bad line breaking before '?'.
? speed : $.fx.speeds[speed] || $.fx.speeds._default;

Lint at line 492 character 17: Expected '{' and instead saw 'val'.
val = [parseFloat(style), unit];

Lint at line 557 character 27: Expected '{' and instead saw 'return'.
if ((t/=d/2) < 1) return c/2*t*t + b;

Lint at line 567 character 27: Expected '{' and instead saw 'return'.
if ((t/=d/2) < 1) return c/2*t*t*t + b;

Lint at line 577 character 27: Expected '{' and instead saw 'return'.
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;

Lint at line 587 character 27: Expected '{' and instead saw 'return'.
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;

Lint at line 600 character 18: Use '===' to compare with '0'.
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;

Lint at line 606 character 14: Use '===' to compare with '0'.
if (t==0) return b;

Lint at line 606 character 19: Expected '{' and instead saw 'return'.
if (t==0) return b;

Lint at line 607 character 19: Expected '{' and instead saw 'return'.
if (t==d) return b+c;

Lint at line 608 character 27: Expected '{' and instead saw 'return'.
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;

Lint at line 618 character 27: Expected '{' and instead saw 'return'.
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;

Lint at line 623 character 14: Use '===' to compare with '0'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 623 character 19: Expected '{' and instead saw 'return'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 623 character 45: Expected '{' and instead saw 'return'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 623 character 66: Expected '{' and instead saw 'p'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 623 character 70: A leading decimal point can be confused with a dot: '.3'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 624 character 42: 's' is already defined.
if (a < Math.abs(c)) { a=c; var s=p/4; }

Lint at line 625 character 14: Expected '{' and instead saw 'var'.
else var s = p/(2*Math.PI) * Math.asin (c/a);

Lint at line 625 character 20: 's' is already defined.
else var s = p/(2*Math.PI) * Math.asin (c/a);

Lint at line 630 character 14: Use '===' to compare with '0'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 630 character 19: Expected '{' and instead saw 'return'.
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;

Lint at line 630 character 19: Too many errors. (88% scanned).


cookiebaseduserprefstore.js

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()) {