Commons:User scripts/users namespace/reports/User:Arbitrarily0/custom-hotcat.js

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

jshint edit

  1. 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_remove_upload ( text ) {
  2. ISSUE: line 52 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 54 character 88: Use '===' to compare with 'null'. - Evidence: if ( wgNamespaceNumber != -1 || wgCanonicalSpecialPageName != "Upload" || wgUserName == null) return ;
  4. ISSUE: line 58 character 10: Use '===' to compare with 'null'. - Evidence: if (ip == null) return;
  5. ISSUE: line 82 character 13: Use '===' to compare with 'null'. - Evidence: if (label == null)
  6. ISSUE: line 119 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 122 character 13: Use '!==' to compare with 'null'. - Evidence: if (input != null) hotcat_closeform ();
  8. ISSUE: line 128 character 19: eval can be harmful. - Evidence: do_submit = eval (hotcat_old_onsubmit);
  9. ISSUE: line 142 character 21: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
  10. ISSUE: line 142 character 23: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
  11. ISSUE: line 142 character 84: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
  12. ISSUE: line 142 character 86: Bad or unnecessary escaping. - Evidence: var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
  13. ISSUE: line 149 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 153 character 52: ['creator'] is better written in dot notation. - Evidence: && ( wgNamespaceNumber == wgNamespaceIds['creator']
  15. ISSUE: line 154 character 52: ['timedtext'] is better written in dot notation. - Evidence: || wgNamespaceNumber == wgNamespaceIds['timedtext']
  16. ISSUE: line 162 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 create_regexp_str (name)
  17. ISSUE: line 164 character 32: Use '===' to compare with '0'. - Evidence: if (!name || name.length == 0) return "";
  18. ISSUE: line 198 character 57: Expected a 'break' statement before 'case'. - Evidence: container = document.getElementById ('quickbar');
  19. ISSUE: line 212 character 52: Use '!==' to compare with 'null'. - Evidence: return document.getElementById ('ca-edit') != null;
  20. ISSUE: line 231 character 20: Use '===' to compare with 'null'. - Evidence: if (visible_cats == null) {
  21. ISSUE: line 234 character 21: Use '===' to compare with 'null'. - Evidence: if (hidden_cats == null) {
  22. ISSUE: line 269 character 43: Use '!==' to compare with 'null'. - Evidence: && UploadForm.previous_hotcat_state != null)
  23. ISSUE: line 273 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 ) {
  24. ISSUE: line 286 character 2: Missing semicolon. - Evidence: }
  25. ISSUE: line 288 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 ) {
  26. ISSUE: line 297 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 ) {
  27. ISSUE: line 318 character 31: Use '!==' to compare with '0'. - Evidence: if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
  28. ISSUE: line 319 character 31: Use '===' to compare with '0'. - Evidence: if (href.indexOf (prefix) == 0) {
  29. ISSUE: line 340 character 51: Script URL. - Evidence: modify_link.href = "javascript:hotcat_modify(\"" + mod_id + "\");" ;
  30. ISSUE: line 348 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 ) {
  31. ISSUE: line 355 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) {
  32. ISSUE: line 359 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) {
  33. ISSUE: line 371 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) {
  34. ISSUE: line 387 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)
  35. ISSUE: line 400 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) {
  36. ISSUE: line 421 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) {
  37. ISSUE: line 434 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)
  38. ISSUE: line 445 character 26: The array literal notation [] is preferable. - Evidence: var result = new Array ();
  39. ISSUE: line 447 character 51: Use '!==' to compare with 'null'. - Evidence: while ((curr_match = cat_regex.exec (wikitext)) != null) {
  40. ISSUE: line 454 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_insertionpoint (wikitext)
  41. ISSUE: line 463 character 72: Bad or unnecessary escaping. - Evidence: var re = new RegExp("\\[\\[\\s*(?:" + hotcat_cnames_regexp + ")\\s*:\[^\\]\]+\\]\\]", "ig" );
  42. ISSUE: line 463 character 78: Bad or unnecessary escaping. - Evidence: var re = new RegExp("\\[\\[\\s*(?:" + hotcat_cnames_regexp + ")\\s*:\[^\\]\]+\\]\\]", "ig" );
  43. ISSUE: line 465 character 30: Use '!==' to compare with 'null'. - Evidence: while( re.exec(copiedtext) != null ) index = re.lastIndex;
  44. ISSUE: line 475 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 () {
  45. ISSUE: line 479 character 27: The array literal notation [] is preferable. - Evidence: var summary = new Array () ;
  46. ISSUE: line 493 character 15: Use '!==' to compare with 'null'. - Evidence: if (cat_key != null) cat_key = '|' + cat_key;
  47. ISSUE: line 494 character 14: Use '!==' to compare with 'null'. - Evidence: if (cat_rm != null && cat_rm.length > 0) {
  48. ISSUE: line 496 character 36: Use '===' to compare with '0'. - Evidence: if (!matches || matches.length == 0) {
  49. ISSUE: line 504 character 19: Use '!==' to compare with 'null'. - Evidence: if (cat_add != null && cat_add.length > 0 && matches[0].match.length > 1) {
  50. ISSUE: line 506 character 21: Use '===' to compare with 'null'. - Evidence: if (cat_key == null) cat_key = matches[0].match[2]; // Remember the category key, if any.
  51. ISSUE: line 506 character 21: Too many errors. (42% scanned). - Evidence: undefined