Commons:User scripts/users namespace/reports/User:Plentn/Gadget-ImageAnnotator.js

This is the report page for User:Plentn/Gadget-ImageAnnotator.js. It is bot-maintained. All manual changes might be overwritten.

jshint edit

  1. ISSUE: line 40 character 77: Missing semicolon. - Evidence: var ImageAnnotation = function () {this.initialize.apply (this, arguments);}
  2. ISSUE: line 45 character 14: Use '!==' to compare with '0'. - Evidence: if (result != 0) return result;
  3. ISSUE: line 293 character 25: Use '===' to compare with '0'. - Evidence: if (reason.length == 0) {
  4. ISSUE: line 448 character 36: Use '===' to compare with 'null'. - Evidence: if (text == null) return "";
  5. ISSUE: line 626 character 30: Use '===' to compare with '0'. - Evidence: if (!data || data.length == 0) { // Empty text
  6. ISSUE: line 755 character 35: Use '!==' to compare with 'null'. - Evidence: if (self.note.content != null) {
  7. ISSUE: line 936 character 16: 'name' is already defined. - Evidence: var name = getElementsByClassName (this.scope, '*', 'wpImageAnnotatorFullName');
  8. ISSUE: line 943 character 63: Use '===' to compare with '0'. - Evidence: if (!this.may_edit && (!annotations || annotations.length == 0))
  9. ISSUE: line 1026 character 98: Missing semicolon. - Evidence: this.icon.onclick = (function () {window.location = this.img.parentNode.href;}).bind (this)
  10. ISSUE: line 1055 character 96: Don't make functions within a loop. - Evidence: && !Array.exists (this.annotations, function (note) {return note.model.id == id;})
  11. ISSUE: line 1072 character 50: Use '===' to compare with '0'. - Evidence: if (!this.main_div || this.main_div.length == 0)
  12. ISSUE: line 1122 character 9: Don't make functions within a loop. - Evidence: );
  13. ISSUE: line 1197 character 16: Use '===' to compare with '0'. - Evidence: if (view_x == 0) view_x = 1;
  14. ISSUE: line 1198 character 16: Use '===' to compare with '0'. - Evidence: if (view_y == 0) view_y = 1;
  15. ISSUE: line 1222 character 54: Use '===' to compare with '0'. - Evidence: if (!this.annotations || this.annotations.length == 0 || this.icon) return;
  16. ISSUE: line 1232 character 18: 'i' is already defined. - Evidence: for (var i = 0; i < this.annotations.length; i++) {
  17. ISSUE: line 1280 character 11: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function intersect_rectangles (a, b)
  18. ISSUE: line 1304 character 24: 'i' is already defined. - Evidence: for (var i = this.annotations.length - 1; i >= 0; i--) {
  19. ISSUE: line 1306 character 51: Use '!==' to compare with 'null'. - Evidence: if ( display != 'none' && display != null
  20. ISSUE: line 1348 character 33: Use '===' to compare with '0'. - Evidence: if (this.annotations.length == 0) this.setDefaultMsg (); //If we removed the last one, clear the msg
  21. ISSUE: line 1456 character 42: Use '!==' to compare with 'null'. - Evidence: if (!config || ImageAnnotator_config != null) return;
  22. ISSUE: line 1479 character 51: Use '!==' to compare with 'null'. - Evidence: self.haveAjax = (LAPI.Ajax.getRequest () != null);
  23. ISSUE: line 1748 character 32: Use '===' to compare with '0'. - Evidence: if (!img || img.length == 0) return null;
  24. ISSUE: line 1840 character 26: Use '===' to compare with '0'. - Evidence: if (self.imgs.length == 0) return;
  25. ISSUE: line 1915 character 11: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function get_size (info) {
  26. ISSUE: line 1916 character 58: Use '===' to compare with '0'. - Evidence: if (!info.imageinfo || info.imageinfo.length == 0) return;
  27. ISSUE: line 1927 character 25: Use '!==' to compare with '0'. - Evidence: if (i != 0 || !self.may_edit || !info.protection || wgNamespaceNumber != 6) return;
  28. ISSUE: line 2032 character 6: Missing semicolon. - Evidence: }
  29. ISSUE: line 2041 character 6: Missing semicolon. - Evidence: }
  30. ISSUE: line 2060 character 23: 'item' is already defined. - Evidence: for (var item in self.defaults) {
  31. ISSUE: line 2171 character 49: Use '!==' to compare with 'null'. - Evidence: IA.haveAjax = (LAPI.Ajax.getRequest () != null);
  32. ISSUE: line 2221 character 38: Use '===' to compare with '0'. - Evidence: if (self.may_edit && idx == 0 && !result) self.may_edit = false;
  33. ISSUE: line 2226 character 26: Use '===' to compare with '0'. - Evidence: if (self.imgs.length == 0) return;
  34. ISSUE: line 2240 character 39: Use '===' to compare with '0'. - Evidence: ( (wgRestrictionEdit.length == 0 || wgUserGroups && wgUserGroups.join (' ').contains ('sysop'))
  35. ISSUE: line 2250 character 61: Use '===' to compare with '0'. - Evidence: self.may_edit = (!sharedUpload || sharedUpload.length == 0);
  36. ISSUE: line 2268 character 63: Use '===' to compare with '0'. - Evidence: self.viewers[i] = new ImageNotesViewer (self.imgs[i], i == 0 && self.may_edit);
  37. ISSUE: line 2269 character 6: Unnecessary semicolon. - Evidence: };
  38. ISSUE: line 2301 character 5: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function track (evt) {
  39. ISSUE: line 2326 character 6: Unnecessary semicolon. - Evidence: };
  40. ISSUE: line 2328 character 5: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function pause (evt)
  41. ISSUE: line 2334 character 6: Unnecessary semicolon. - Evidence: };
  42. ISSUE: line 2336 character 5: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function resume (evt)
  43. ISSUE: line 2346 character 6: Unnecessary semicolon. - Evidence: };
  44. ISSUE: line 2348 character 5: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function stop_tracking (evt)
  45. ISSUE: line 2394 character 6: Unnecessary semicolon. - Evidence: };
  46. ISSUE: line 2396 character 5: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function start_tracking (evt)
  47. ISSUE: line 2405 character 45: Missing semicolon. - Evidence: self.base_y = mouse_pos.y - origin.y
  48. ISSUE: line 2428 character 6: Unnecessary semicolon. - Evidence: };
  49. ISSUE: line 2430 character 5: Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function. - Evidence: function add_new (evt)
  50. ISSUE: line 2477 character 6: Unnecessary semicolon. - Evidence: };
  51. ISSUE: line 2477 character 6: Too many errors. (77% scanned). - Evidence: undefined