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