Commons:User scripts/users namespace/reports/User:Docu/t.js

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

jshint edit

  1. ISSUE: line 126 character 60: ['creator'] is better written in dot notation. - Evidence: && ( wgNamespaceNumber == wgNamespaceIds['creator']
  2. ISSUE: line 127 character 60: ['timedtext'] is better written in dot notation. - Evidence: || wgNamespaceNumber == wgNamespaceIds['timedtext']
  3. ISSUE: line 206 character 59: Use '===' to compare with '0'. - Evidence: ((wgServer.indexOf( "https://secure.wikimedia.org") == 0)
  4. ISSUE: line 226 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) {
  5. ISSUE: line 229 character 34: Use '===' to compare with '0'. - Evidence: if (!name || name.length == 0) return "";
  6. ISSUE: line 247 character 90: Missing semicolon. - Evidence: if (fallback && canonical != fallback) regexp += '|' + create_regexp_str (fallback)
  7. ISSUE: line 290 character 31: Use '===' to compare with '0'. - Evidence: if (href.indexOf (script) == 0 || href.indexOf (wgServer + script) == 0) {
  8. ISSUE: line 290 character 72: Use '===' to compare with '0'. - Evidence: if (href.indexOf (script) == 0 || href.indexOf (wgServer + script) == 0) {
  9. ISSUE: line 296 character 33: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  10. ISSUE: line 297 character 33: Use '===' to compare with '0'. - Evidence: if (href.indexOf (prefix) == 0)
  11. ISSUE: line 306 character 28: Use '===' to compare with '0'. - Evidence: if (!str || str.length == 0) return str;
  12. ISSUE: line 318 character 68: Bad or unnecessary escaping. - Evidence: new RegExp ('\\[\\[\\s*(?:' + HotCat.category_regexp + ')\\s*:\[^\\]\]+\\]\\]', 'g');
  13. ISSUE: line 318 character 74: Bad or unnecessary escaping. - Evidence: new RegExp ('\\[\\[\\s*(?:' + HotCat.category_regexp + ')\\s*:\[^\\]\]+\\]\\]', 'g');
  14. ISSUE: line 347 character 55: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (copiedtext)) != null) {
  15. ISSUE: line 362 character 42: Use '!==' to compare with 'null'. - Evidence: while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
  16. ISSUE: line 375 character 38: Use '===' to compare with '0'. - Evidence: if (!matches || matches.length == 0) {
  17. ISSUE: line 387 character 19: Use '===' to compare with 'null'. - Evidence: if (key == null) key = matches[0].match[2]; // Remember the category key, if any.
  18. ISSUE: line 397 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'))
  19. ISSUE: line 416 character 19: 'matches' is already defined. - Evidence: var matches = find_category (wikitext, toAdd);
  20. ISSUE: line 456 character 24: Use '===' to compare with '0'. - Evidence: if (toAdd.length == 0) toAdd = null;
  21. ISSUE: line 460 character 27: Use '===' to compare with '0'. - Evidence: if (toRemove.length == 0) toRemove = null;
  22. ISSUE: line 563 character 24: eval can be harmful. - Evidence: var json = eval ('(' + request.responseText + ')');
  23. ISSUE: line 623 character 21: Use '!==' to compare with '0'. - Evidence: if (wgArticleId != 0) {
  24. ISSUE: line 631 character 18: eval can be harmful. - Evidence: setPage (eval ('(' + request.responseText + ')'));
  25. ISSUE: line 672 character 82: Use '===' to compare with '0'. - Evidence: if (!editors[i].originalCategory || editors[i].originalCategory.length == 0) {
  26. ISSUE: line 689 character 17: Use '===' to compare with '0'. - Evidence: if (changes == 0) return;
  27. ISSUE: line 693 character 50: Use '===' to compare with '0'. - Evidence: commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
  28. ISSUE: line 703 character 19: 'i' is already defined. - Evidence: for (var i=0; i < deleted.length; i++) {
  29. ISSUE: line 711 character 19: 'i' is already defined. - Evidence: for (var i=0; i < added.length; i++) {
  30. ISSUE: line 721 character 19: 'i' is already defined. - Evidence: for (var i=0; i < changed.length; i++) {
  31. ISSUE: line 775 character 16: 'i' is already defined. - Evidence: for (var i = 0; i < toResolve.length; i++) {
  32. ISSUE: line 793 character 38: eval can be harmful. - Evidence: resolveRedirects (toResolve, eval ('(' + request.responseText + ')'));
  33. ISSUE: line 808 character 26: ['title'] is better written in dot notation. - Evidence: var cat = cats[c]['title'];
  34. ISSUE: line 821 character 28: Use '===' to compare with '0'. - Evidence: if (!lks || lks.length == 0) return;
  35. ISSUE: line 824 character 20: ['ns'] is better written in dot notation. - Evidence: if ( lks[i]['ns'] == 14 // Category namespace
  36. ISSUE: line 825 character 20: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  37. ISSUE: line 825 character 39: ['title'] is better written in dot notation. - Evidence: && lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
  38. ISSUE: line 828 character 27: ['title'] is better written in dot notation. - Evidence: var match = lks[i]['title'];
  39. ISSUE: line 841 character 48: Use '!==' to compare with 'null'. - Evidence: titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
  40. ISSUE: line 857 character 26: Use '===' to compare with '0'. - Evidence: if (toResolve.length == 0) {
  41. ISSUE: line 896 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  42. ISSUE: line 897 character 32: Use '!==' to compare with 'null'. - Evidence: if ( queryResult != null && queryResult.length == 2
  43. ISSUE: line 923 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  44. ISSUE: line 929 character 59: Use '!==' to compare with '0'. - Evidence: if (titles[i].toLowerCase().indexOf (key) != 0) {
  45. ISSUE: line 944 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  46. ISSUE: line 960 character 31: eval can be harmful. - Evidence: var queryResult = eval ('(' + responseText + ')');
  47. ISSUE: line 985 character 74: Unnecessary semicolon. - Evidence: function CategoryEditor () { this.initialize.apply (this, arguments); };
  48. ISSUE: line 1124 character 35: Use '===' to compare with '0'. - Evidence: if (this.keyCount == 0) return this.processKey (evt);
  49. ISSUE: line 1273 character 65: Use '!==' to compare with 'null'. - Evidence: this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
  50. ISSUE: line 1295 character 20: Use '===' to compare with '0'. - Evidence: if (v.length == 0) return result;
  51. ISSUE: line 1295 character 20: Too many errors. (51% scanned). - Evidence: undefined