Commons:User scripts/users namespace/reports/User:Kanonkas/category.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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

jshint[edit]

  1. ISSUE: line 37 character 88: Use '===' to compare with 'null'. - Evidence: if ( wgNamespaceNumber != -1 || wgCanonicalSpecialPageName != "Upload" || wgUserName == null) return ;
  2. ISSUE: line 41 character 10: Use '===' to compare with 'null'. - Evidence: if (ip == null) return;
  3. ISSUE: line 65 character 13: Use '===' to compare with 'null'. - Evidence: if (label == null)
  4. ISSUE: line 105 character 13: Use '!==' to compare with 'null'. - Evidence: if (input != null) hotcat_ok ();
  5. ISSUE: line 111 character 19: eval can be harmful. - Evidence: do_submit = eval (hotcat_old_onsubmit);
  6. ISSUE: line 124 character 21: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  7. ISSUE: line 124 character 23: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  8. ISSUE: line 124 character 43: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  9. ISSUE: line 124 character 45: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  10. ISSUE: line 147 character 57: Expected a 'break' statement before 'case'. - Evidence: container = document.getElementById ('quickbar');
  11. ISSUE: line 161 character 52: Use '!==' to compare with 'null'. - Evidence: return document.getElementById ('ca-edit') != null;
  12. ISSUE: line 180 character 20: Use '===' to compare with 'null'. - Evidence: if (visible_cats == null) {
  13. ISSUE: line 183 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  14. ISSUE: line 195 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  15. ISSUE: line 216 character 43: Use '!==' to compare with 'null'. - Evidence: && UploadForm.previous_hotcat_state != null)
  16. ISSUE: line 232 character 2: Missing semicolon. - Evidence: }
  17. ISSUE: line 264 character 31: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  18. ISSUE: line 265 character 31: Use '===' to compare with '0'. - Evidence: if (href.indexOf (prefix) == 0) {
  19. ISSUE: line 286 character 51: Script URL. - Evidence: modify_link.href = "javascript:hotcat_modify(\"" + mod_id + "\");" ;
  20. ISSUE: line 390 character 26: The array literal notation [] is preferable. - Evidence: var result = new Array ();
  21. ISSUE: line 392 character 51: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (wikitext)) != null) {
  22. ISSUE: line 407 character 27: The array literal notation [] is preferable. - Evidence: var summary = new Array () ;
  23. ISSUE: line 419 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_key != null) cat_key = '|' + cat_key;
  24. ISSUE: line 420 character 14: Use '!==' to compare with 'null'. - Evidence: if (cat_rm != null && cat_rm.length > 0) {
  25. ISSUE: line 422 character 36: Use '===' to compare with '0'. - Evidence: if (!matches || matches.length == 0) {
  26. ISSUE: line 430 character 19: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0 && matches[0].match.length > 1)
  27. ISSUE: line 449 character 41: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  28. ISSUE: line 449 character 43: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  29. ISSUE: line 449 character 84: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  30. ISSUE: line 449 character 86: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  31. ISSUE: line 453 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0) {
  32. ISSUE: line 454 character 17: 'matches' is already defined. - Evidence: var matches = hotcat_find_category (t, cat_add);
  33. ISSUE: line 460 character 17: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  34. ISSUE: line 460 character 19: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  35. ISSUE: line 460 character 52: Use '!==' to compare with 'null'. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  36. ISSUE: line 460 character 80: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  37. ISSUE: line 460 character 82: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  38. ISSUE: line 461 character 39: Bad or unnecessary escaping. - Evidence: summary.push ("Adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  39. ISSUE: line 461 character 41: Bad or unnecessary escaping. - Evidence: summary.push ("Adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  40. ISSUE: line 461 character 84: Bad or unnecessary escaping. - Evidence: summary.push ("Adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  41. ISSUE: line 461 character 86: Bad or unnecessary escaping. - Evidence: summary.push ("Adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  42. ISSUE: line 462 character 14: 't2' is already defined. - Evidence: var t2 = t.replace(hotcat_uncat_regex, ""); // Remove "uncat" templates
  43. ISSUE: line 496 character 45: Script URL. - Evidence: a_add.href = "javascript:hotcat_add_new()" ;
  44. ISSUE: line 534 character 13: Use '===' to compare with 'null'. - Evidence: if (label == null || !label.data) return defaultText;
  45. ISSUE: line 554 character 15: Use '!==' to compare with 'null'. - Evidence: if (l != null)
  46. ISSUE: line 561 character 15: Use '!==' to compare with 'null'. - Evidence: if (l != null)
  47. ISSUE: line 574 character 36: ['HotCatEditBoxWidth'] is better written in dot notation. - Evidence: var default_width = JSconfig.keys['HotCatEditBoxWidth'];
  48. ISSUE: line 583 character 66: ['HotCatDelay'] is better written in dot notation. - Evidence: window.setTimeout ("hotcat_text_changed ();", JSconfig.keys['HotCatDelay']);
  49. ISSUE: line 583 character 13: Implied eval. Consider passing a function instead of a string. - Evidence: window.setTimeout ("hotcat_text_changed ();", JSconfig.keys['HotCatDelay']);
  50. ISSUE: line 603 character 12: Use '!==' to compare with 'null'. - Evidence: if (list != null) form.appendChild ( list ) ;
  51. ISSUE: line 603 character 12: Too many errors. (58% scanned). - Evidence: undefined