Commons:User scripts/users namespace/reports/User:PicTrans/commons.js

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

jshint edit

  1. ISSUE: line 121 character 46: ['creator'] is better written in dot notation. - Evidence: && ( ns === wgNamespaceIds['creator']
  2. ISSUE: line 122 character 46: ['timedtext'] is better written in dot notation. - Evidence: || ns === wgNamespaceIds['timedtext']
  3. ISSUE: line 123 character 46: ['institution'] is better written in dot notation. - Evidence: || ns === wgNamespaceIds['institution']
  4. ISSUE: line 212 character 55: Use '!==' to compare with 'null'. - Evidence: var is_ie6 = /msie ([0-9]{1,}[\.0-9]{0,})/.exec(ua) != null && parseFloat(RegExp.$1) <= 6.0;
  5. ISSUE: line 259 character 51: eval can be harmful. - Evidence: if (settings.success) settings.success (eval ('(' + req.responseText + ')'));
  6. ISSUE: line 278 character 4: Unnecessary semicolon. - Evidence: };
  7. ISSUE: line 400 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 autoLocalize (namespaceNumber, fallback) {
  8. ISSUE: line 471 character 33: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  9. ISSUE: line 472 character 33: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0 && prefix.substring(0, 2) == '//') prefix = document.location.protocol + prefix; // Protocol-relative wgServer?
  10. ISSUE: line 535 character 55: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (copiedtext)) != null) {
  11. ISSUE: line 552 character 42: Use '!==' to compare with 'null'. - Evidence: while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
  12. ISSUE: line 590 character 19: Use '===' to compare with 'null'. - Evidence: if (key == null) key = matches[0].match[2]; // Remember the category key, if any.
  13. ISSUE: line 619 character 19: 'matches' is already defined. - Evidence: var matches = find_category (wikitext, toAdd);
  14. ISSUE: line 773 character 6: Unnecessary semicolon. - Evidence: };
  15. ISSUE: line 881 character 50: Use '===' to compare with '0'. - Evidence: commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
  16. ISSUE: line 891 character 19: 'i' is already defined. - Evidence: for (var i=0; i < deleted.length; i++) {
  17. ISSUE: line 899 character 19: 'i' is already defined. - Evidence: for (var i=0; i < added.length; i++) {
  18. ISSUE: line 908 character 19: 'i' is already defined. - Evidence: for (var i=0; i < changed.length; i++) {
  19. ISSUE: line 958 character 16: 'i' is already defined. - Evidence: for (var i = 0; i < toResolve.length; i++) {
  20. ISSUE: line 982 character 26: ['title'] is better written in dot notation. - Evidence: var cat = cats[c]['title'];
  21. ISSUE: line 998 character 20: ['ns'] is better written in dot notation. - Evidence: if ( lks[i]['ns'] == 14 // Category namespace
  22. ISSUE: line 999 character 20: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  23. ISSUE: line 999 character 39: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  24. ISSUE: line 1002 character 27: ['title'] is better written in dot notation. - Evidence: var match = lks[i]['title'];
  25. ISSUE: line 1007 character 16: 'j' is already defined. - Evidence: for (var j = 0; j < toResolve.length; j++) {
  26. ISSUE: line 1015 character 48: Use '!==' to compare with 'null'. - Evidence: titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
  27. ISSUE: line 1069 character 32: Use '!==' to compare with 'null'. - Evidence: if ( queryResult != null && queryResult.length == 2
  28. ISSUE: line 1099 character 59: Use '!==' to compare with '0'. - Evidence: if (titles[i].toLowerCase().indexOf (key) != 0) {
  29. ISSUE: line 1165 character 74: Unnecessary semicolon. - Evidence: function CategoryEditor () { this.initialize.apply (this, arguments); };
  30. ISSUE: line 1197 character 32: Use '===' to compare with '0'. - Evidence: if (expectedInput.length == 0 && actualValue.length > 0 || expectedInput.length > 0 && actualValue.indexOf (expectedInput) !== 0) {
  31. ISSUE: line 1518 character 65: Use '!==' to compare with 'null'. - Evidence: this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
  32. ISSUE: line 1610 character 50: Variables should not be deleted. - Evidence: window.setTimeout (function () {delete self;}, 10);
  33. ISSUE: line 1662 character 35: Use '!==' to compare with 'null'. - Evidence: || HotCat.blacklist != null && HotCat.blacklist.test(v))
  34. ISSUE: line 1674 character 43: Use '!==' to compare with '0'. - Evidence: this.noCommit = (evtKeys (evt) & 1) != 0;
  35. ISSUE: line 1760 character 31: Use '!==' to compare with 'null'. - Evidence: || HotCat.blacklist != null && HotCat.blacklist.test (this.currentCategory)
  36. ISSUE: line 1854 character 27: Use '!==' to compare with 'null'. - Evidence: if (this.text.value != null && this.text.value != v)
  37. ISSUE: line 1874 character 20: Variables should not be deleted. - Evidence: delete cb;
  38. ISSUE: line 1917 character 59: Use '!==' to compare with 'null'. - Evidence: this.ok.disabled = v.length > 0 && HotCat.blacklist != null && HotCat.blacklist.test (v);
  39. ISSUE: line 1972 character 47: Use '!==' to compare with '0'. - Evidence: if (this.lastInput.indexOf (queryKey) != 0) return;
  40. ISSUE: line 1986 character 30: Use '!==' to compare with 'null'. - Evidence: if (HotCat.blacklist != null) {
  41. ISSUE: line 2013 character 20: 'i' is already defined. - Evidence: for (var i = 0; i < titles.length; i++) {
  42. ISSUE: line 2049 character 18: 'i' is already defined. - Evidence: for (var i = 0 ; i < titles.length ; i++) {
  43. ISSUE: line 2175 character 49: Use '!==' to compare with '0'. - Evidence: if (dontModify || newVal.indexOf (actVal) != 0) return false;
  44. ISSUE: line 2249 character 26: Expected a 'break' statement before 'case'. - Evidence: case 38: dir = -1; // Up arrow
  45. ISSUE: line 2250 character 40: Expected a 'break' statement before 'case'. - Evidence: case 40: if (dir === 0) dir = 1; // Down arrow
  46. ISSUE: line 2251 character 56: Expected a 'break' statement before 'case'. - Evidence: case 33: if (dir === 0) dir = -HotCat.list_size; // Page up
  47. ISSUE: line 2286 character 65: Use '!==' to compare with '0'. - Evidence: if (curr >= 0 && curr < this.list.options.length && dir != 0) this.list.options[curr].selected = false;
  48. ISSUE: line 2334 character 26: ['HotCatDontAddToWatchlist'] is better written in dot notation. - Evidence:  : (typeof (config['HotCatDontAddToWatchlist']) != 'undefined'
  49. ISSUE: line 2335 character 21: ['HotCatDontAddToWatchlist'] is better written in dot notation. - Evidence:  ? config['HotCatDontAddToWatchlist']
  50. ISSUE: line 2342 character 26: ['HotCatNoAutoCommit'] is better written in dot notation. - Evidence:  : (typeof (config['HotCatNoAutoCommit']) != 'undefined'
  51. ISSUE: line 2342 character 26: Too many errors. (81% scanned). - Evidence: undefined