Commons:User scripts/users namespace/reports/User:Avicennasis/HotCatMod.js

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

jshint edit

  1. ISSUE: line 136 character 60: ['creator'] is better written in dot notation. - Evidence: && ( wgNamespaceNumber == wgNamespaceIds['creator']
  2. ISSUE: line 137 character 60: ['timedtext'] is better written in dot notation. - Evidence: || wgNamespaceNumber == wgNamespaceIds['timedtext']
  3. ISSUE: line 138 character 60: ['institution'] is better written in dot notation. - Evidence: || wgNamespaceNumber == wgNamespaceIds['institution']
  4. ISSUE: line 221 character 71: Unnecessary semicolon. - Evidence: function LoadTrigger () { this.initialize.apply (this, arguments); };
  5. ISSUE: line 318 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) {
  6. ISSUE: line 388 character 33: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  7. ISSUE: line 389 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?
  8. ISSUE: line 440 character 55: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (copiedtext)) != null) {
  9. ISSUE: line 457 character 42: Use '!==' to compare with 'null'. - Evidence: while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
  10. ISSUE: line 495 character 19: Use '===' to compare with 'null'. - Evidence: if (key == null) key = matches[0].match[2]; // Remember the category key, if any.
  11. ISSUE: line 524 character 19: 'matches' is already defined. - Evidence: var matches = find_category (wikitext, toAdd);
  12. ISSUE: line 669 character 16: eval can be harmful. - Evidence: setPage (eval ('(' + request.responseText + ')'));
  13. ISSUE: line 760 character 50: Use '===' to compare with '0'. - Evidence: commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
  14. ISSUE: line 770 character 19: 'i' is already defined. - Evidence: for (var i=0; i < deleted.length; i++) {
  15. ISSUE: line 778 character 19: 'i' is already defined. - Evidence: for (var i=0; i < added.length; i++) {
  16. ISSUE: line 788 character 19: 'i' is already defined. - Evidence: for (var i=0; i < changed.length; i++) {
  17. ISSUE: line 843 character 16: 'i' is already defined. - Evidence: for (var i = 0; i < toResolve.length; i++) {
  18. ISSUE: line 861 character 38: eval can be harmful. - Evidence: resolveRedirects (toResolve, eval ('(' + request.responseText + ')'));
  19. ISSUE: line 881 character 26: ['title'] is better written in dot notation. - Evidence: var cat = cats[c]['title'];
  20. ISSUE: line 897 character 20: ['ns'] is better written in dot notation. - Evidence: if ( lks[i]['ns'] == 14 // Category namespace
  21. ISSUE: line 898 character 20: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  22. ISSUE: line 898 character 39: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  23. ISSUE: line 901 character 27: ['title'] is better written in dot notation. - Evidence: var match = lks[i]['title'];
  24. ISSUE: line 906 character 16: 'j' is already defined. - Evidence: for (var j = 0; j < toResolve.length; j++) {
  25. ISSUE: line 914 character 48: Use '!==' to compare with 'null'. - Evidence: titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
  26. ISSUE: line 969 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  27. ISSUE: line 970 character 32: Use '!==' to compare with 'null'. - Evidence: if ( queryResult != null && queryResult.length == 2
  28. ISSUE: line 996 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  29. ISSUE: line 1002 character 59: Use '!==' to compare with '0'. - Evidence: if (titles[i].toLowerCase().indexOf (key) != 0) {
  30. ISSUE: line 1017 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  31. ISSUE: line 1033 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  32. ISSUE: line 1058 character 74: Unnecessary semicolon. - Evidence: function CategoryEditor () { this.initialize.apply (this, arguments); };
  33. ISSUE: line 1357 character 65: Use '!==' to compare with 'null'. - Evidence: this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
  34. ISSUE: line 1458 character 50: Variables should not be deleted. - Evidence: window.setTimeout (function () {delete self;}, 10);
  35. ISSUE: line 1510 character 35: Use '!==' to compare with 'null'. - Evidence: || HotCat.blacklist != null && HotCat.blacklist.test(v))
  36. ISSUE: line 1522 character 43: Use '!==' to compare with '0'. - Evidence: this.noCommit = (evtKeys (evt) & 1) != 0;
  37. ISSUE: line 1608 character 31: Use '!==' to compare with 'null'. - Evidence: || HotCat.blacklist != null && HotCat.blacklist.test (this.currentCategory)
  38. ISSUE: line 1702 character 27: Use '!==' to compare with 'null'. - Evidence: if (this.text.value != null && this.text.value != v)
  39. ISSUE: line 1718 character 53: Use '!==' to compare with 'null'. - Evidence: if (r.status == 200 && r.responseText != null) {
  40. ISSUE: line 1721 character 36: Use '===' to compare with 'null'. - Evidence: if (cb.allTitles == null) {
  41. ISSUE: line 1737 character 24: Variables should not be deleted. - Evidence: delete cb;
  42. ISSUE: line 1764 character 59: Use '!==' to compare with 'null'. - Evidence: this.ok.disabled = v.length > 0 && HotCat.blacklist != null && HotCat.blacklist.test (v);
  43. ISSUE: line 1814 character 42: Use '!==' to compare with 'null'. - Evidence: haveEngine = this.engineSelector != null;
  44. ISSUE: line 1819 character 47: Use '!==' to compare with '0'. - Evidence: if (this.lastInput.indexOf (queryKey) != 0) return;
  45. ISSUE: line 1833 character 30: Use '!==' to compare with 'null'. - Evidence: if (HotCat.blacklist != null) {
  46. ISSUE: line 1860 character 20: 'i' is already defined. - Evidence: for (var i = 0; i < titles.length; i++) {
  47. ISSUE: line 1985 character 18: 'i' is already defined. - Evidence: for (var i = 0 ; i < titles.length ; i++) {
  48. ISSUE: line 2015 character 49: Use '!==' to compare with '0'. - Evidence: if (dontModify || newVal.indexOf (actVal) != 0) return false;
  49. ISSUE: line 2047 character 26: Expected a 'break' statement before 'case'. - Evidence: case 38: dir = -1; // Up arrow
  50. ISSUE: line 2048 character 40: Expected a 'break' statement before 'case'. - Evidence: case 40: if (dir === 0) dir = 1; // Down arrow
  51. ISSUE: line 2048 character 40: Too many errors. (78% scanned). - Evidence: undefined