Commons:User scripts/users namespace/reports/User:Darkwind/gadget-hotcat.js

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

jshint edit

  1. ISSUE: line 117 character 46: ['creator'] is better written in dot notation. - Evidence: && ( ns === wgNamespaceIds['creator']
  2. ISSUE: line 118 character 46: ['timedtext'] is better written in dot notation. - Evidence: || ns === wgNamespaceIds['timedtext']
  3. ISSUE: line 119 character 46: ['institution'] is better written in dot notation. - Evidence: || ns === wgNamespaceIds['institution']
  4. ISSUE: line 209 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 256 character 51: eval can be harmful. - Evidence: if (settings.success) settings.success (eval ('(' + req.responseText + ')'));
  6. ISSUE: line 272 character 71: Unnecessary semicolon. - Evidence: function LoadTrigger () { this.initialize.apply (this, arguments); };
  7. ISSUE: line 401 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 472 character 33: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  9. ISSUE: line 473 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 536 character 55: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (copiedtext)) != null) {
  11. ISSUE: line 553 character 42: Use '!==' to compare with 'null'. - Evidence: while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
  12. ISSUE: line 591 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 620 character 19: 'matches' is already defined. - Evidence: var matches = find_category (wikitext, toAdd);
  14. ISSUE: line 877 character 50: Use '===' to compare with '0'. - Evidence: commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
  15. ISSUE: line 887 character 19: 'i' is already defined. - Evidence: for (var i=0; i < deleted.length; i++) {
  16. ISSUE: line 895 character 19: 'i' is already defined. - Evidence: for (var i=0; i < added.length; i++) {
  17. ISSUE: line 905 character 19: 'i' is already defined. - Evidence: for (var i=0; i < changed.length; i++) {
  18. ISSUE: line 956 character 16: 'i' is already defined. - Evidence: for (var i = 0; i < toResolve.length; i++) {
  19. ISSUE: line 980 character 26: ['title'] is better written in dot notation. - Evidence: var cat = cats[c]['title'];
  20. ISSUE: line 996 character 20: ['ns'] is better written in dot notation. - Evidence: if ( lks[i]['ns'] == 14 // Category namespace
  21. ISSUE: line 997 character 20: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  22. ISSUE: line 997 character 39: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  23. ISSUE: line 1000 character 27: ['title'] is better written in dot notation. - Evidence: var match = lks[i]['title'];
  24. ISSUE: line 1005 character 16: 'j' is already defined. - Evidence: for (var j = 0; j < toResolve.length; j++) {
  25. ISSUE: line 1013 character 48: Use '!==' to compare with 'null'. - Evidence: titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
  26. ISSUE: line 1067 character 32: Use '!==' to compare with 'null'. - Evidence: if ( queryResult != null && queryResult.length == 2
  27. ISSUE: line 1097 character 59: Use '!==' to compare with '0'. - Evidence: if (titles[i].toLowerCase().indexOf (key) != 0) {
  28. ISSUE: line 1163 character 74: Unnecessary semicolon. - Evidence: function CategoryEditor () { this.initialize.apply (this, arguments); };
  29. ISSUE: line 1196 character 32: Use '===' to compare with '0'. - Evidence: if (expectedInput.length == 0 && actualValue.length > 0 || expectedInput.length > 0 && actualValue.indexOf (expectedInput) !== 0) {
  30. ISSUE: line 1508 character 65: Use '!==' to compare with 'null'. - Evidence: this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
  31. ISSUE: line 1600 character 50: Variables should not be deleted. - Evidence: window.setTimeout (function () {delete self;}, 10);
  32. ISSUE: line 1652 character 35: Use '!==' to compare with 'null'. - Evidence: || HotCat.blacklist != null && HotCat.blacklist.test(v))
  33. ISSUE: line 1664 character 43: Use '!==' to compare with '0'. - Evidence: this.noCommit = (evtKeys (evt) & 1) != 0;
  34. ISSUE: line 1750 character 31: Use '!==' to compare with 'null'. - Evidence: || HotCat.blacklist != null && HotCat.blacklist.test (this.currentCategory)
  35. ISSUE: line 1844 character 27: Use '!==' to compare with 'null'. - Evidence: if (this.text.value != null && this.text.value != v)
  36. ISSUE: line 1864 character 20: Variables should not be deleted. - Evidence: delete cb;
  37. ISSUE: line 1907 character 59: Use '!==' to compare with 'null'. - Evidence: this.ok.disabled = v.length > 0 && HotCat.blacklist != null && HotCat.blacklist.test (v);
  38. ISSUE: line 1962 character 47: Use '!==' to compare with '0'. - Evidence: if (this.lastInput.indexOf (queryKey) != 0) return;
  39. ISSUE: line 1976 character 30: Use '!==' to compare with 'null'. - Evidence: if (HotCat.blacklist != null) {
  40. ISSUE: line 2003 character 20: 'i' is already defined. - Evidence: for (var i = 0; i < titles.length; i++) {
  41. ISSUE: line 2039 character 18: 'i' is already defined. - Evidence: for (var i = 0 ; i < titles.length ; i++) {
  42. ISSUE: line 2165 character 49: Use '!==' to compare with '0'. - Evidence: if (dontModify || newVal.indexOf (actVal) != 0) return false;
  43. ISSUE: line 2239 character 26: Expected a 'break' statement before 'case'. - Evidence: case 38: dir = -1; // Up arrow
  44. ISSUE: line 2240 character 40: Expected a 'break' statement before 'case'. - Evidence: case 40: if (dir === 0) dir = 1; // Down arrow
  45. ISSUE: line 2241 character 56: Expected a 'break' statement before 'case'. - Evidence: case 33: if (dir === 0) dir = -HotCat.list_size; // Page up
  46. ISSUE: line 2276 character 65: Use '!==' to compare with '0'. - Evidence: if (curr >= 0 && curr < this.list.options.length && dir != 0) this.list.options[curr].selected = false;
  47. ISSUE: line 2324 character 26: ['HotCatDontAddToWatchlist'] is better written in dot notation. - Evidence:  : (typeof (config['HotCatDontAddToWatchlist']) != 'undefined'
  48. ISSUE: line 2325 character 21: ['HotCatDontAddToWatchlist'] is better written in dot notation. - Evidence:  ? config['HotCatDontAddToWatchlist']
  49. ISSUE: line 2332 character 26: ['HotCatNoAutoCommit'] is better written in dot notation. - Evidence:  : (typeof (config['HotCatNoAutoCommit']) != 'undefined'
  50. ISSUE: line 2333 character 21: ['HotCatNoAutoCommit'] is better written in dot notation. - Evidence:  ? config['HotCatNoAutoCommit']
  51. ISSUE: line 2333 character 21: Too many errors. (81% scanned). - Evidence: undefined