Commons:User scripts/users namespace/reports/User:Tgr/catinsert.js

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

jshint edit

  1. ISSUE: line 31 character 7: document.write can be a form of eval. - Evidence: document.write('<link rel="stylesheet" type="text/css" href="' + ciStyleSheet + '">');
  2. ISSUE: line 34 character 4: 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 ciGetDialog() {
  3. ISSUE: line 50 character 11: Missing semicolon. - Evidence: }
  4. ISSUE: line 52 character 68: Use '===' to compare with 'true'. - Evidence: if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
  5. ISSUE: line 55 character 21: 'box' is already defined. - Evidence: var box = document.getElementById('wpTextbox1');
  6. ISSUE: line 57 character 10: 'box' used out of scope. - Evidence: box.parentNode.insertBefore(ciFrame, box);
  7. ISSUE: line 57 character 47: 'box' used out of scope. - Evidence: box.parentNode.insertBefore(ciFrame, box);
  8. ISSUE: line 89 character 4: 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 ciCloseDialog() {
  9. ISSUE: line 91 character 65: Use '===' to compare with 'true'. - Evidence: if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
  10. ISSUE: line 98 character 4: 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 ciNextDiv(e) {
  11. ISSUE: line 108 character 4: 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 ciExpandNode(cat, mode, lnk) {
  12. ISSUE: line 114 character 65: Missing semicolon. - Evidence: lnk.onclick= function() { ciCollapseNode(cat, mode, lnk) }
  13. ISSUE: line 121 character 4: 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 ciCollapseNode(cat, mode, lnk) {
  14. ISSUE: line 127 character 63: Missing semicolon. - Evidence: lnk.onclick= function() { ciExpandNode(cat, mode, lnk) }
  15. ISSUE: line 130 character 4: 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 ciLoadNode(cat, mode, lnk, div) {
  16. ISSUE: line 135 character 66: Missing semicolon. - Evidence: lnk.onclick= function() { ciCollapseNode(cat, mode, lnk); }
  17. ISSUE: line 140 character 4: 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 ciLoadChildren(cat, mode, div) {
  18. ISSUE: line 147 character 24: Use '===' to compare with 'false'. - Evidence: if(ciError == false) { // show default list on error
  19. ISSUE: line 156 character 22: Use '===' to compare with ''. - Evidence: if ( result == '' ) {
  20. ISSUE: line 159 character 23: Use '===' to compare with '0'. - Evidence: if ( mode == 0 ) result= categoryTreeNoSubcategoriesMsg;
  21. ISSUE: line 176 character 4: 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 ciInsertCategory(cat) {
  22. ISSUE: line 178 character 65: Use '===' to compare with 'true'. - Evidence: if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
  23. ISSUE: line 183 character 35: Use '===' to compare with 'true'. - Evidence: if (wikEdHighlightSyntax == true) {
  24. ISSUE: line 193 character 35: Use '===' to compare with 'true'. - Evidence: if (wikEdHighlightSyntax == true) {
  25. ISSUE: line 201 character 66: Missing semicolon. - Evidence: var winScroll = document.documentElement.scrollTop
  26. ISSUE: line 203 character 30: 'winScroll' is already defined. - Evidence: var winScroll = document.body.scrollTop;
  27. ISSUE: line 207 character 53: 'winScroll' used out of scope. - Evidence: document.documentElement.scrollTop = winScroll;
  28. ISSUE: line 209 character 42: 'winScroll' used out of scope. - Evidence: document.body.scrollTop = winScroll;
  29. ISSUE: line 224 character 4: 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 ciButtonClicked() {
  30. ISSUE: line 228 character 18: 'e' is already defined. - Evidence: else var e = event;
  31. ISSUE: line 229 character 18: 'e' used out of scope. - Evidence: if (typeof(e.shiftKey) != "undefined") var shift = e.shiftKey;
  32. ISSUE: line 229 character 58: 'e' used out of scope. - Evidence: if (typeof(e.shiftKey) != "undefined") var shift = e.shiftKey;
  33. ISSUE: line 230 character 22: 'shift' is already defined. - Evidence: else var shift = e.modifiers & Event.SHIFT_MASK;
  34. ISSUE: line 230 character 24: 'e' used out of scope. - Evidence: else var shift = e.modifiers & Event.SHIFT_MASK;
  35. ISSUE: line 231 character 11: 'shift' used out of scope. - Evidence: if (shift) { // set default starting category
  36. ISSUE: line 242 character 65: Use '===' to compare with 'true'. - Evidence: if (typeof(wikEdUseWikEd) != 'undefined' && wikEdUseWikEd == true) {
  37. ISSUE: line 256 character 60: Use '!==' to compare with '0'. - Evidence: while(ciTextRange.text.length == l && count != 0) {
  38. ISSUE: line 262 character 27: 'selection' is already defined. - Evidence: var selection = ciTextRange.text;
  39. ISSUE: line 264 character 27: 'selection' is already defined. - Evidence: var selection = textarea.value.substring(textarea.selectionStart, textarea.selectionEnd);
  40. ISSUE: line 268 character 11: 'selection' used out of scope. - Evidence: if(!selection) { // use ciStartingCategory as default
  41. ISSUE: line 269 character 10: 'selection' used out of scope. - Evidence: selection = ciStartingCategory;
  42. ISSUE: line 271 character 22: 'selection' used out of scope. - Evidence: var match = selection.match(/(\s+)$/);
  43. ISSUE: line 273 character 13: 'selection' used out of scope. - Evidence: selection = selection.substring(0, selection.length - (match[1].length));
  44. ISSUE: line 273 character 25: 'selection' used out of scope. - Evidence: selection = selection.substring(0, selection.length - (match[1].length));
  45. ISSUE: line 273 character 48: 'selection' used out of scope. - Evidence: selection = selection.substring(0, selection.length - (match[1].length));
  46. ISSUE: line 276 character 18: 'selection' used out of scope. - Evidence: match = selection.match(/\[\[.*(\|.*)]]$/);
  47. ISSUE: line 280 character 10: 'selection' used out of scope. - Evidence: selection = selection.replace(/^\[\[[Cc]ategory:/, '');
  48. ISSUE: line 280 character 22: 'selection' used out of scope. - Evidence: selection = selection.replace(/^\[\[[Cc]ategory:/, '');
  49. ISSUE: line 281 character 10: 'selection' used out of scope. - Evidence: selection = selection.replace(/(\|.*)?]]$/, '');
  50. ISSUE: line 281 character 22: 'selection' used out of scope. - Evidence: selection = selection.replace(/(\|.*)?]]$/, '');
  51. ISSUE: line 281 character 22: Too many errors. (92% scanned). - Evidence: undefined