Commons:User scripts/users namespace/reports/User:Ezagren/vector.js

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

jshint edit

  1. ISSUE: line 120 character 60: ['creator'] is better written in dot notation. - Evidence: && ( wgNamespaceNumber == wgNamespaceIds['creator']
  2. ISSUE: line 121 character 60: ['timedtext'] is better written in dot notation. - Evidence: || wgNamespaceNumber == wgNamespaceIds['timedtext']
  3. ISSUE: line 195 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) {
  4. ISSUE: line 198 character 34: Use '===' to compare with '0'. - Evidence: if (!name || name.length == 0) return "";
  5. ISSUE: line 216 character 90: Missing semicolon. - Evidence: if (fallback && canonical != fallback) regexp += '|' + create_regexp_str (fallback)
  6. ISSUE: line 259 character 31: Use '===' to compare with '0'. - Evidence: if (href.indexOf (script) == 0 || href.indexOf (wgServer + script) == 0) {
  7. ISSUE: line 259 character 72: Use '===' to compare with '0'. - Evidence: if (href.indexOf (script) == 0 || href.indexOf (wgServer + script) == 0) {
  8. ISSUE: line 265 character 33: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  9. ISSUE: line 266 character 33: Use '===' to compare with '0'. - Evidence: if (href.indexOf (prefix) == 0)
  10. ISSUE: line 275 character 28: Use '===' to compare with '0'. - Evidence: if (!str || str.length == 0) return str;
  11. ISSUE: line 287 character 68: Bad or unnecessary escaping. - Evidence: new RegExp ('\\[\\[\\s*(?:' + HotCat.category_regexp + ')\\s*:\[^\\]\]+\\]\\]', 'g');
  12. ISSUE: line 287 character 74: Bad or unnecessary escaping. - Evidence: new RegExp ('\\[\\[\\s*(?:' + HotCat.category_regexp + ')\\s*:\[^\\]\]+\\]\\]', 'g');
  13. ISSUE: line 316 character 55: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (copiedtext)) != null) {
  14. ISSUE: line 331 character 42: Use '!==' to compare with 'null'. - Evidence: while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
  15. ISSUE: line 344 character 38: Use '===' to compare with '0'. - Evidence: if (!matches || matches.length == 0) {
  16. ISSUE: line 356 character 19: Use '===' to compare with 'null'. - Evidence: if (key == null) key = matches[0].match[2]; // Remember the category key, if any.
  17. ISSUE: line 366 character 66: Use '===' to compare with '0'. - Evidence: if (i >= 0 && before.charAt (i) == '\n' && (after.length == 0 || j < after.length && after.charAt (j) == '\n'))
  18. ISSUE: line 385 character 19: 'matches' is already defined. - Evidence: var matches = find_category (wikitext, toAdd);
  19. ISSUE: line 425 character 24: Use '===' to compare with '0'. - Evidence: if (toAdd.length == 0) {
  20. ISSUE: line 433 character 27: Use '===' to compare with '0'. - Evidence: if (toRemove.length == 0) {
  21. ISSUE: line 529 character 24: eval can be harmful. - Evidence: var json = eval ('(' + request.responseText + ')');
  22. ISSUE: line 586 character 21: Use '!==' to compare with '0'. - Evidence: if (wgArticleId != 0) {
  23. ISSUE: line 594 character 18: eval can be harmful. - Evidence: setPage (eval ('(' + request.responseText + ')'));
  24. ISSUE: line 634 character 82: Use '===' to compare with '0'. - Evidence: if (!editors[i].originalCategory || editors[i].originalCategory.length == 0) {
  25. ISSUE: line 653 character 50: Use '===' to compare with '0'. - Evidence: commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
  26. ISSUE: line 663 character 19: 'i' is already defined. - Evidence: for (var i=0; i < deleted.length; i++) {
  27. ISSUE: line 671 character 19: 'i' is already defined. - Evidence: for (var i=0; i < added.length; i++) {
  28. ISSUE: line 679 character 19: 'i' is already defined. - Evidence: for (var i=0; i < changed.length; i++) {
  29. ISSUE: line 733 character 16: 'i' is already defined. - Evidence: for (var i = 0; i < toResolve.length; i++) {
  30. ISSUE: line 751 character 38: eval can be harmful. - Evidence: resolveRedirects (toResolve, eval ('(' + request.responseText + ')'));
  31. ISSUE: line 766 character 26: ['title'] is better written in dot notation. - Evidence: var cat = cats[c]['title'];
  32. ISSUE: line 779 character 28: Use '===' to compare with '0'. - Evidence: if (!lks || lks.length == 0) return;
  33. ISSUE: line 782 character 20: ['ns'] is better written in dot notation. - Evidence: if ( lks[i]['ns'] == 14 // Category namespace
  34. ISSUE: line 783 character 20: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  35. ISSUE: line 783 character 39: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  36. ISSUE: line 786 character 27: ['title'] is better written in dot notation. - Evidence: var match = lks[i]['title'];
  37. ISSUE: line 799 character 48: Use '!==' to compare with 'null'. - Evidence: titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
  38. ISSUE: line 815 character 26: Use '===' to compare with '0'. - Evidence: if (toResolve.length == 0) {
  39. ISSUE: line 854 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  40. ISSUE: line 855 character 32: Use '!==' to compare with 'null'. - Evidence: if ( queryResult != null && queryResult.length == 2
  41. ISSUE: line 881 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  42. ISSUE: line 887 character 59: Use '!==' to compare with '0'. - Evidence: if (titles[i].toLowerCase().indexOf (key) != 0) {
  43. ISSUE: line 902 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  44. ISSUE: line 918 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  45. ISSUE: line 943 character 74: Unnecessary semicolon. - Evidence: function CategoryEditor () { this.initialize.apply (this, arguments); };
  46. ISSUE: line 1082 character 35: Use '===' to compare with '0'. - Evidence: if (this.keyCount == 0) return this.processKey (evt);
  47. ISSUE: line 1221 character 65: Use '!==' to compare with 'null'. - Evidence: this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
  48. ISSUE: line 1242 character 20: Use '===' to compare with '0'. - Evidence: if (v.length == 0) return result;
  49. ISSUE: line 1252 character 20: Use '===' to compare with '0'. - Evidence: if (v.length == 0) return result;
  50. ISSUE: line 1264 character 20: Use '===' to compare with '0'. - Evidence: if (v.length == 0) return result;
  51. ISSUE: line 1264 character 20: Too many errors. (52% scanned). - Evidence: undefined