Commons:User scripts/users namespace/reports/User:Hoverflyz/image annotator.js

This is the report page for User:Hoverflyz/image annotator.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 281 character 25: Use '===' to compare with '0'. - Evidence: if (reason.length == 0) {
  4. ISSUE: line 438 character 36: Use '===' to compare with 'null'. - Evidence: if (text == null) return "";
  5. ISSUE: line 616 character 30: Use '===' to compare with '0'. - Evidence: if (!data || data.length == 0) { // Empty text
  6. ISSUE: line 745 character 35: Use '!==' to compare with 'null'. - Evidence: if (self.note.content != null) {
  7. ISSUE: line 927 character 16: 'name' is already defined. - Evidence: var name = getElementsByClassName (this.scope, '*', 'wpImageAnnotatorFullName');
  8. ISSUE: line 934 character 63: Use '===' to compare with '0'. - Evidence: if (!this.may_edit && (!annotations || annotations.length == 0))
  9. ISSUE: line 1014 character 98: Missing semicolon. - Evidence: this.icon.onclick = (function () {window.location = this.img.parentNode.href;}).bind (this)
  10. ISSUE: line 1043 character 96: Don't make functions within a loop. - Evidence: && !Array.exists (this.annotations, function (note) {return note.model.id == id;})
  11. ISSUE: line 1060 character 50: Use '===' to compare with '0'. - Evidence: if (!this.main_div || this.main_div.length == 0)
  12. ISSUE: line 1110 character 9: Don't make functions within a loop. - Evidence: );
  13. ISSUE: line 1185 character 16: Use '===' to compare with '0'. - Evidence: if (view_x == 0) view_x = 1;
  14. ISSUE: line 1186 character 16: Use '===' to compare with '0'. - Evidence: if (view_y == 0) view_y = 1;
  15. ISSUE: line 1210 character 54: Use '===' to compare with '0'. - Evidence: if (!this.annotations || this.annotations.length == 0 || this.icon) return;
  16. ISSUE: line 1220 character 18: 'i' is already defined. - Evidence: for (var i = 0; i < this.annotations.length; i++) {
  17. ISSUE: line 1268 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 1292 character 24: 'i' is already defined. - Evidence: for (var i = this.annotations.length - 1; i >= 0; i--) {
  19. ISSUE: line 1294 character 51: Use '!==' to compare with 'null'. - Evidence: if ( display != 'none' && display != null
  20. ISSUE: line 1336 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 1444 character 42: Use '!==' to compare with 'null'. - Evidence: if (!config || ImageAnnotator_config != null) return;
  22. ISSUE: line 1467 character 51: Use '!==' to compare with 'null'. - Evidence: self.haveAjax = (LAPI.Ajax.getRequest () != null);
  23. ISSUE: line 1736 character 32: Use '===' to compare with '0'. - Evidence: if (!img || img.length == 0) return null;
  24. ISSUE: line 1828 character 26: Use '===' to compare with '0'. - Evidence: if (self.imgs.length == 0) return;
  25. ISSUE: line 1903 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 1904 character 58: Use '===' to compare with '0'. - Evidence: if (!info.imageinfo || info.imageinfo.length == 0) return;
  27. ISSUE: line 1915 character 25: Use '!==' to compare with '0'. - Evidence: if (i != 0 || !self.may_edit || !info.protection) return;
  28. ISSUE: line 2019 character 6: Missing semicolon. - Evidence: }
  29. ISSUE: line 2028 character 6: Missing semicolon. - Evidence: }
  30. ISSUE: line 2047 character 23: 'item' is already defined. - Evidence: for (var item in self.defaults) {
  31. ISSUE: line 2158 character 49: Use '!==' to compare with 'null'. - Evidence: IA.haveAjax = (LAPI.Ajax.getRequest () != null);
  32. ISSUE: line 2208 character 38: Use '===' to compare with '0'. - Evidence: if (self.may_edit && idx == 0 && !result) self.may_edit = false;
  33. ISSUE: line 2213 character 26: Use '===' to compare with '0'. - Evidence: if (self.imgs.length == 0) return;
  34. ISSUE: line 2227 character 39: Use '===' to compare with '0'. - Evidence: ( (wgRestrictionEdit.length == 0 || wgUserGroups && wgUserGroups.join (' ').contains ('sysop'))
  35. ISSUE: line 2237 character 61: Use '===' to compare with '0'. - Evidence: self.may_edit = (!sharedUpload || sharedUpload.length == 0);
  36. ISSUE: line 2255 character 63: Use '===' to compare with '0'. - Evidence: self.viewers[i] = new ImageNotesViewer (self.imgs[i], i == 0 && self.may_edit);
  37. ISSUE: line 2256 character 6: Unnecessary semicolon. - Evidence: };
  38. ISSUE: line 2288 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 2313 character 6: Unnecessary semicolon. - Evidence: };
  40. ISSUE: line 2315 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 2321 character 6: Unnecessary semicolon. - Evidence: };
  42. ISSUE: line 2323 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 2333 character 6: Unnecessary semicolon. - Evidence: };
  44. ISSUE: line 2335 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 2381 character 6: Unnecessary semicolon. - Evidence: };
  46. ISSUE: line 2383 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 2392 character 45: Missing semicolon. - Evidence: self.base_y = mouse_pos.y - origin.y
  48. ISSUE: line 2415 character 6: Unnecessary semicolon. - Evidence: };
  49. ISSUE: line 2417 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 2464 character 6: Unnecessary semicolon. - Evidence: };
  51. ISSUE: line 2464 character 6: Too many errors. (77% scanned). - Evidence: undefined