Commons:User scripts/users namespace/reports/User:JohnnyB/monobook.js

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

jshint edit

  1. ISSUE: line 1 character 14: ['HotCatDelay'] is better written in dot notation. - Evidence: JSconfig.keys['HotCatDelay'] = 200; // Or whatever other value you prefer
  2. ISSUE: line 39 character 88: Use '===' to compare with 'null'. - Evidence: if ( wgNamespaceNumber != -1 || wgCanonicalSpecialPageName != "Upload" || wgUserName == null) return ;
  3. ISSUE: line 43 character 10: Use '===' to compare with 'null'. - Evidence: if (ip == null) return;
  4. ISSUE: line 67 character 13: Use '===' to compare with 'null'. - Evidence: if (label == null)
  5. ISSUE: line 107 character 13: Use '!==' to compare with 'null'. - Evidence: if (input != null) hotcat_ok ();
  6. ISSUE: line 113 character 19: eval can be harmful. - Evidence: do_submit = eval (hotcat_old_onsubmit);
  7. ISSUE: line 126 character 21: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  8. ISSUE: line 126 character 23: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  9. ISSUE: line 126 character 43: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  10. ISSUE: line 126 character 45: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  11. ISSUE: line 149 character 57: Expected a 'break' statement before 'case'. - Evidence: container = document.getElementById ('quickbar');
  12. ISSUE: line 163 character 52: Use '!==' to compare with 'null'. - Evidence: return document.getElementById ('ca-edit') != null;
  13. ISSUE: line 182 character 20: Use '===' to compare with 'null'. - Evidence: if (visible_cats == null) {
  14. ISSUE: line 185 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  15. ISSUE: line 197 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  16. ISSUE: line 218 character 43: Use '!==' to compare with 'null'. - Evidence: && UploadForm.previous_hotcat_state != null)
  17. ISSUE: line 234 character 2: Missing semicolon. - Evidence: }
  18. ISSUE: line 266 character 31: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  19. ISSUE: line 267 character 31: Use '===' to compare with '0'. - Evidence: if (href.indexOf (prefix) == 0) {
  20. ISSUE: line 288 character 51: Script URL. - Evidence: modify_link.href = "javascript:hotcat_modify(\"" + mod_id + "\");" ;
  21. ISSUE: line 392 character 26: The array literal notation [] is preferable. - Evidence: var result = new Array ();
  22. ISSUE: line 394 character 51: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (wikitext)) != null) {
  23. ISSUE: line 409 character 27: The array literal notation [] is preferable. - Evidence: var summary = new Array () ;
  24. ISSUE: line 421 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_key != null) cat_key = '|' + cat_key;
  25. ISSUE: line 422 character 14: Use '!==' to compare with 'null'. - Evidence: if (cat_rm != null && cat_rm.length > 0) {
  26. ISSUE: line 424 character 36: Use '===' to compare with '0'. - Evidence: if (!matches || matches.length == 0) {
  27. ISSUE: line 432 character 19: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0 && matches[0].match.length > 1)
  28. ISSUE: line 451 character 41: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  29. ISSUE: line 451 character 43: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  30. ISSUE: line 451 character 84: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  31. ISSUE: line 451 character 86: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  32. ISSUE: line 455 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0) {
  33. ISSUE: line 456 character 17: 'matches' is already defined. - Evidence: var matches = hotcat_find_category (t, cat_add);
  34. ISSUE: line 462 character 17: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  35. ISSUE: line 462 character 19: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  36. ISSUE: line 462 character 52: Use '!==' to compare with 'null'. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  37. ISSUE: line 462 character 80: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  38. ISSUE: line 462 character 82: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  39. ISSUE: line 463 character 45: Bad or unnecessary escaping. - Evidence: summary.push ("Quick-adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  40. ISSUE: line 463 character 47: Bad or unnecessary escaping. - Evidence: summary.push ("Quick-adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  41. ISSUE: line 463 character 90: Bad or unnecessary escaping. - Evidence: summary.push ("Quick-adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  42. ISSUE: line 463 character 92: Bad or unnecessary escaping. - Evidence: summary.push ("Quick-adding category \[\[:Category:" + cat_add + "|" + cat_add + "\]\]" + comment);
  43. ISSUE: line 464 character 14: 't2' is already defined. - Evidence: var t2 = t.replace(hotcat_uncat_regex, ""); // Remove "uncat" templates
  44. ISSUE: line 498 character 45: Script URL. - Evidence: a_add.href = "javascript:hotcat_add_new()" ;
  45. ISSUE: line 536 character 13: Use '===' to compare with 'null'. - Evidence: if (label == null || !label.data) return defaultText;
  46. ISSUE: line 556 character 15: Use '!==' to compare with 'null'. - Evidence: if (l != null)
  47. ISSUE: line 563 character 15: Use '!==' to compare with 'null'. - Evidence: if (l != null)
  48. ISSUE: line 576 character 36: ['HotCatEditBoxWidth'] is better written in dot notation. - Evidence: var default_width = JSconfig.keys['HotCatEditBoxWidth'];
  49. ISSUE: line 585 character 66: ['HotCatDelay'] is better written in dot notation. - Evidence: window.setTimeout ("hotcat_text_changed ();", JSconfig.keys['HotCatDelay']);
  50. ISSUE: line 585 character 13: Implied eval. Consider passing a function instead of a string. - Evidence: window.setTimeout ("hotcat_text_changed ();", JSconfig.keys['HotCatDelay']);
  51. ISSUE: line 585 character 13: Too many errors. (56% scanned). - Evidence: undefined