Commons:User scripts/reports/MediaWiki:Gadget-GalleryDetails.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

This is the report page for MediaWiki:Gadget-GalleryDetails.js. It is bot-maintained. All manual changes might be overwritten.

jshint[edit]

  1. ISSUE: line 116 character 1: 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 titleFromLink (node)
  2. ISSUE: line 158 character 32: Use '===' to compare with '0'. - Evidence: if (!list || list.length == 0) return null;
  3. ISSUE: line 161 character 38: Use '===' to compare with '0'. - Evidence: var all = !keys || keys.length == 0;
  4. ISSUE: line 176 character 17: Use '===' to compare with '0'. - Evidence: if (found == 0) return null; else return result;
  5. ISSUE: line 184 character 15: ['Model'] is better written in dot notation. - Evidence: if (exif['Model']) {
  6. ISSUE: line 185 character 17: ['Make'] is better written in dot notation. - Evidence: if (exif['Make'] && exif['Model'].indexOf (exif['Make']) >= 0) exif['Make'] = null;
  7. ISSUE: line 185 character 33: ['Model'] is better written in dot notation. - Evidence: if (exif['Make'] && exif['Model'].indexOf (exif['Make']) >= 0) exif['Make'] = null;
  8. ISSUE: line 185 character 56: ['Make'] is better written in dot notation. - Evidence: if (exif['Make'] && exif['Model'].indexOf (exif['Make']) >= 0) exif['Make'] = null;
  9. ISSUE: line 185 character 76: ['Make'] is better written in dot notation. - Evidence: if (exif['Make'] && exif['Model'].indexOf (exif['Make']) >= 0) exif['Make'] = null;
  10. ISSUE: line 188 character 17: ['Make'] is better written in dot notation. - Evidence: if (exif['Make']) span.appendChild (document.createTextNode (exif['Make'] + ' '));
  11. ISSUE: line 188 character 74: ['Make'] is better written in dot notation. - Evidence: if (exif['Make']) span.appendChild (document.createTextNode (exif['Make'] + ' '));
  12. ISSUE: line 190 character 25: ['Model'] is better written in dot notation. - Evidence: exif['Model']
  13. ISSUE: line 191 character 71: ['Model'] is better written in dot notation. - Evidence: , 'https://en.wikipedia.org/wiki/' + encodeURI (exif['Model'])
  14. ISSUE: line 199 character 22: ['DateTime'] is better written in dot notation. - Evidence: var time = exif['DateTime'] || exif['DateTimeOriginal'] || null;
  15. ISSUE: line 199 character 42: ['DateTimeOriginal'] is better written in dot notation. - Evidence: var time = exif['DateTime'] || exif['DateTimeOriginal'] || null;
  16. ISSUE: line 285 character 18: 'i' is already defined. - Evidence: for (var i = 0; i < info.categories.length; i++) {
  17. ISSUE: line 404 character 20: 'i' is already defined. - Evidence: for (var i = 1; i < additional_links.length; i++) {
  18. ISSUE: line 433 character 43: Missing '()' invoking a constructor. - Evidence: GalleryDetailsTableViewer.prototype = new GalleryDetailsViewer;
  19. ISSUE: line 530 character 39: Use '===' to compare with '0'. - Evidence: if (!existing || existing.length == 0) return;
  20. ISSUE: line 532 character 33: The array literal notation [] is preferable. - Evidence: this.image_list = new Array ();
  21. ISSUE: line 555 character 25: Use '===' to compare with '0'. - Evidence: if (this.nof_images == 0) return;
  22. ISSUE: line 600 character 36: Use '===' to compare with '0'. - Evidence: if (!title || title.length == 0) continue;
  23. ISSUE: line 617 character 39: The array literal notation [] is preferable. - Evidence: var categories = new Array();
  24. ISSUE: line 639 character 52: The array literal notation [] is preferable. - Evidence: this.image_list[i].users = new Array ();
  25. ISSUE: line 672 character 21: 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 fix_double_encoding (match) {
  26. ISSUE: line 683 character 54: Use '!==' to compare with 'null'. - Evidence: while ((m = utf8.exec (str)) != null) {
  27. ISSUE: line 730 character 33: The array literal notation [] is preferable. - Evidence: this.viewer = new Array ();
  28. ISSUE: line 740 character 20: 'i' is already defined. - Evidence: for (var i = 0; i < this.viewer.length; i++)
  29. ISSUE: line 798 character 23: Use '===' to compare with '0'. - Evidence: if (tables.length == 0) {
  30. ISSUE: line 803 character 23: Use '===' to compare with '0'. - Evidence: if (tables.length == 0) return; // Nothing here: nothing to do.
  31. ISSUE: line 811 character 52: Script URL. - Evidence: ,'javascript:GalleryDetailsLoader.load ();'
  32. ISSUE: line 839 character 20: 'i' is already defined. - Evidence: for (var i = 0; i < tables.length; i++) {
  33. ISSUE: line 859 character 52: 'i' used out of scope. - Evidence: , 'gallery_details_wrapper_' + i