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
- 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 293 character 25
: Use '===' to compare with '0'. - Evidence:if (reason.length == 0) {
- ISSUE:
line 448 character 36
: Use '===' to compare with 'null'. - Evidence:if (text == null) return "";
- ISSUE:
line 626 character 30
: Use '===' to compare with '0'. - Evidence:if (!data || data.length == 0) { // Empty text
- ISSUE:
line 755 character 35
: Use '!==' to compare with 'null'. - Evidence:if (self.note.content != null) {
- ISSUE:
line 936 character 16
: 'name' is already defined. - Evidence:var name = getElementsByClassName (this.scope, '*', 'wpImageAnnotatorFullName');
- ISSUE:
line 943 character 63
: Use '===' to compare with '0'. - Evidence:if (!this.may_edit && (!annotations || annotations.length == 0))
- ISSUE:
line 1026 character 98
: Missing semicolon. - Evidence:this.icon.onclick = (function () {window.location = this.img.parentNode.href;}).bind (this)
- ISSUE:
line 1055 character 96
: Don't make functions within a loop. - Evidence:&& !Array.exists (this.annotations, function (note) {return note.model.id == id;})
- ISSUE:
line 1072 character 50
: Use '===' to compare with '0'. - Evidence:if (!this.main_div || this.main_div.length == 0)
- ISSUE:
line 1122 character 9
: Don't make functions within a loop. - Evidence:);
- ISSUE:
line 1197 character 16
: Use '===' to compare with '0'. - Evidence:if (view_x == 0) view_x = 1;
- ISSUE:
line 1198 character 16
: Use '===' to compare with '0'. - Evidence:if (view_y == 0) view_y = 1;
- ISSUE:
line 1222 character 54
: Use '===' to compare with '0'. - Evidence:if (!this.annotations || this.annotations.length == 0 || this.icon) return;
- ISSUE:
line 1232 character 18
: 'i' is already defined. - Evidence:for (var i = 0; i < this.annotations.length; i++) {
- 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)
- ISSUE:
line 1304 character 24
: 'i' is already defined. - Evidence:for (var i = this.annotations.length - 1; i >= 0; i--) {
- ISSUE:
line 1306 character 51
: Use '!==' to compare with 'null'. - Evidence:if ( display != 'none' && display != null
- 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
- ISSUE:
line 1456 character 42
: Use '!==' to compare with 'null'. - Evidence:if (!config || ImageAnnotator_config != null) return;
- ISSUE:
line 1479 character 51
: Use '!==' to compare with 'null'. - Evidence:self.haveAjax = (LAPI.Ajax.getRequest () != null);
- ISSUE:
line 1748 character 32
: Use '===' to compare with '0'. - Evidence:if (!img || img.length == 0) return null;
- ISSUE:
line 1840 character 26
: Use '===' to compare with '0'. - Evidence:if (self.imgs.length == 0) return;
- 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) {
- ISSUE:
line 1916 character 58
: Use '===' to compare with '0'. - Evidence:if (!info.imageinfo || info.imageinfo.length == 0) return;
- ISSUE:
line 1927 character 25
: Use '!==' to compare with '0'. - Evidence:if (i != 0 || !self.may_edit || !info.protection || wgNamespaceNumber != 6) return;
- ISSUE:
line 2032 character 6
: Missing semicolon. - Evidence:}
- ISSUE:
line 2041 character 6
: Missing semicolon. - Evidence:}
- ISSUE:
line 2060 character 23
: 'item' is already defined. - Evidence:for (var item in self.defaults) {
- ISSUE:
line 2171 character 49
: Use '!==' to compare with 'null'. - Evidence:IA.haveAjax = (LAPI.Ajax.getRequest () != null);
- ISSUE:
line 2221 character 38
: Use '===' to compare with '0'. - Evidence:if (self.may_edit && idx == 0 && !result) self.may_edit = false;
- ISSUE:
line 2226 character 26
: Use '===' to compare with '0'. - Evidence:if (self.imgs.length == 0) return;
- ISSUE:
line 2240 character 39
: Use '===' to compare with '0'. - Evidence:( (wgRestrictionEdit.length == 0 || wgUserGroups && wgUserGroups.join (' ').contains ('sysop'))
- ISSUE:
line 2250 character 61
: Use '===' to compare with '0'. - Evidence:self.may_edit = (!sharedUpload || sharedUpload.length == 0);
- ISSUE:
line 2268 character 63
: Use '===' to compare with '0'. - Evidence:self.viewers[i] = new ImageNotesViewer (self.imgs[i], i == 0 && self.may_edit);
- ISSUE:
line 2269 character 6
: Unnecessary semicolon. - Evidence:};
- 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) {
- ISSUE:
line 2326 character 6
: Unnecessary semicolon. - Evidence:};
- 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)
- ISSUE:
line 2334 character 6
: Unnecessary semicolon. - Evidence:};
- 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)
- ISSUE:
line 2346 character 6
: Unnecessary semicolon. - Evidence:};
- 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)
- ISSUE:
line 2394 character 6
: Unnecessary semicolon. - Evidence:};
- 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)
- ISSUE:
line 2405 character 45
: Missing semicolon. - Evidence:self.base_y = mouse_pos.y - origin.y
- ISSUE:
line 2428 character 6
: Unnecessary semicolon. - Evidence:};
- 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)
- ISSUE:
line 2477 character 6
: Unnecessary semicolon. - Evidence:};
- ISSUE:
line 2477 character 6
: Too many errors. (77% scanned). - Evidence:undefined