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:

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

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 241 character 41: Expected '{' and instead saw 'that'.
if (that.minimized) that.maximize();

Lint at line 242 character 26: Expected '{' and instead saw 'that'.
else that.minimize();

Lint at line 245 character 45: Expected '{' and instead saw 'that'.
if (that.minimized) that.maximize();

Lint at line 246 character 30: Expected '{' and instead saw 'that'.
else that.minimize();

Lint at line 375 character 39: Expected a conditional expression and instead saw an assignment.
if (pref_name = arguments[i]) {

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

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

AG.DashboardManager.js

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)).addClass("aui-dialog");

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 398 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 398 character 110: Missing space after '1000'.
securityTokenRefreshRate = AJS.parseUri(document.location.href).queryKey["__st_refresh"] || 1000*60*12;

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

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

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

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

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

Lint at line 411 character 13: 'AG' is not defined.
AG.param.set(options.params);

Lint at line 413 character 13: 'AG' is not defined.
AG.render.ready(function () {

Lint at line 413 character 13: Too many errors. (81% scanned).


AG.LayoutManager.js

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

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 222 character 79: 'jQuery' is not defined.
var that = this, isIE6OrBelow = !!(AJS.$.browser.msie && parseInt(jQuery.browser.version) <= 6);

Lint at line 222 character 70: Missing radix parameter.
var that = this, isIE6OrBelow = !!(AJS.$.browser.msie && parseInt(jQuery.browser.version) <= 6);

Lint at line 286 character 33: Unexpected space after 'hideGadget'.
function hideGadget () {

Lint at line 292 character 33: Unexpected space after 'showGadget'.
function showGadget () {

Lint at line 299 character 34: Unexpected space after 'validateAdd'.
function validateAdd (numGadgets) {

Lint at line 300 character 21: Missing radix parameter.
if (parseInt(numGadgets) >= AG.param.get("maxGadgets")) {

Lint at line 308 character 37: Unexpected space after 'appendToColumn'.
function appendToColumn () {

Lint at line 317 character 44: Unexpected space after 'isFromDifferentLayout'.
function isFromDifferentLayout () {

Lint at line 321 character 46: Unexpected space after 'ensureIframeDoesntCache'.
function ensureIframeDoesntCache () {

Lint at line 322 character 67: Missing space after 'function'.
AJS.$("iframe", gadget.getElement()).each(function() {

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

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

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

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

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

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

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

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

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

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

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

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 = {};

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

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.Render.js

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

jquery.cookie.js

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

json.js

No problems found

ajs.clone.js

No problems found

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

AG.Sortable.js

No problems found

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

atl-browser.js

Lint at line 56 character 20: 'button' is already defined.
var button = $(button);

Lint at line 68 character 20: 'button' is already defined.
var button = $(button);

Lint at line 92 character 20: 'button' is already defined.
var button = $(button);

Lint at line 112 character 48: Use '!==' to compare with ''.
if ($('#add-gadget-url').attr('value') != "") {

Lint at line 190 character 56: Use '!==' to compare with ''.
if (gadget.thumbnailUri && gadget.thumbnailUri != "") {

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

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

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

Lint at line 217 character 49: Bad line breaking before '+'.
+ gadget.gadgetSpecUri);

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

Lint at line 372 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 372 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 386 character 22: Use '!==' to compare with 'null'.
if(gadgetUrl != null) {

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

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