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

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

jshint edit

  1. ISSUE: line 28 character 1: 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 hotcat_remove_upload ( text ) {
  2. ISSUE: line 40 character 1: 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 hotcat_check_upload () {
  3. ISSUE: line 42 character 88: Use '===' to compare with 'null'. - Evidence: if ( wgNamespaceNumber != -1 || wgCanonicalSpecialPageName != "Upload" || wgUserName == null) return ;
  4. ISSUE: line 46 character 10: Use '===' to compare with 'null'. - Evidence: if (ip == null) return;
  5. ISSUE: line 70 character 13: Use '===' to compare with 'null'. - Evidence: if (label == null)
  6. ISSUE: line 107 character 1: 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 hotcat_on_upload () {
  7. ISSUE: line 110 character 13: Use '!==' to compare with 'null'. - Evidence: if (input != null) hotcat_ok ();
  8. ISSUE: line 116 character 19: eval can be harmful. - Evidence: do_submit = eval (hotcat_old_onsubmit);
  9. ISSUE: line 129 character 21: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  10. ISSUE: line 129 character 23: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  11. ISSUE: line 129 character 43: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  12. ISSUE: line 129 character 45: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[Category:" + t + "\]\]" ;
  13. ISSUE: line 136 character 1: 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 hotcat () {
  14. ISSUE: line 154 character 57: Expected a 'break' statement before 'case'. - Evidence: container = document.getElementById ('quickbar');
  15. ISSUE: line 168 character 52: Use '!==' to compare with 'null'. - Evidence: return document.getElementById ('ca-edit') != null;
  16. ISSUE: line 187 character 20: Use '===' to compare with 'null'. - Evidence: if (visible_cats == null) {
  17. ISSUE: line 190 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  18. ISSUE: line 202 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  19. ISSUE: line 223 character 43: Use '!==' to compare with 'null'. - Evidence: && UploadForm.previous_hotcat_state != null)
  20. ISSUE: line 227 character 1: 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 hotcat_append_add_span ( catline ) {
  21. ISSUE: line 239 character 2: Missing semicolon. - Evidence: }
  22. ISSUE: line 241 character 1: 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 hotcat_is_on_blacklist ( cat_title ) {
  23. ISSUE: line 250 character 1: 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 hotcat_modify_span ( span , i ) {
  24. ISSUE: line 271 character 31: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  25. ISSUE: line 272 character 31: Use '===' to compare with '0'. - Evidence: if (href.indexOf (prefix) == 0) {
  26. ISSUE: line 293 character 51: Script URL. - Evidence: modify_link.href = "javascript:hotcat_modify(\"" + mod_id + "\");" ;
  27. ISSUE: line 300 character 1: 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 hotcat_modify_existing ( catline ) {
  28. ISSUE: line 307 character 1: 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 hotcat_getEvt (evt) {
  29. ISSUE: line 311 character 1: 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 hotcat_evt2node (evt) {
  30. ISSUE: line 323 character 1: 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 hotcat_evtkeys (evt) {
  31. ISSUE: line 339 character 1: 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 hotcat_killEvt (evt)
  32. ISSUE: line 352 character 1: 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 hotcat_remove (evt) {
  33. ISSUE: line 373 character 1: 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 hotcatGetParamValue(paramName, h) {
  34. ISSUE: line 386 character 1: 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 hotcat_find_category (wikitext, category)
  35. ISSUE: line 397 character 26: The array literal notation [] is preferable. - Evidence: var result = new Array ();
  36. ISSUE: line 399 character 51: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (wikitext)) != null) {
  37. ISSUE: line 410 character 1: 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 hotcat_check_action () {
  38. ISSUE: line 414 character 27: The array literal notation [] is preferable. - Evidence: var summary = new Array () ;
  39. ISSUE: line 426 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_key != null) cat_key = '|' + cat_key;
  40. ISSUE: line 427 character 14: Use '!==' to compare with 'null'. - Evidence: if (cat_rm != null && cat_rm.length > 0) {
  41. ISSUE: line 429 character 36: Use '===' to compare with '0'. - Evidence: if (!matches || matches.length == 0) {
  42. ISSUE: line 437 character 19: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0 && matches[0].match.length > 1)
  43. ISSUE: line 456 character 41: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  44. ISSUE: line 456 character 43: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  45. ISSUE: line 456 character 84: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  46. ISSUE: line 456 character 86: Bad or unnecessary escaping. - Evidence: summary.push ( "Removed category \[\[:Category:" + cat_rm + "|" + cat_rm + "\]\]" ) ;
  47. ISSUE: line 460 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0) {
  48. ISSUE: line 461 character 17: 'matches' is already defined. - Evidence: var matches = hotcat_find_category (t, cat_add);
  49. ISSUE: line 467 character 17: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  50. ISSUE: line 467 character 19: Bad or unnecessary escaping. - Evidence: t = t + '\[\[Category:' + cat_add + (cat_key != null ? cat_key : "") + '\]\]\n';
  51. ISSUE: line 467 character 19: Too many errors. (44% scanned). - Evidence: undefined