Commons:User scripts/users namespace/reports/User:Mr.Z-man/closeDR.js

This is the report page for User:Mr.Z-man/closeDR.js. It is bot-maintained. All manual changes might be overwritten.

jshint edit

  1. ISSUE: line 7 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 closeDR_init() {
  2. ISSUE: line 26 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 closeDR_other() {
  3. ISSUE: line 34 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 closeDR_otherdelete() {
  4. ISSUE: line 36 character 3: Read only. - Evidence: close = document.getElementById('closeDR_otherclose').value;
  5. ISSUE: line 39 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 closeDR_otherkeep() {
  6. ISSUE: line 40 character 3: Read only. - Evidence: close = document.getElementById('closeDR_otherclose').value;
  7. ISSUE: line 43 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 closeDR_close(close) {
  8. ISSUE: line 50 character 14: Use '!==' to compare with ''. - Evidence: if (reason != '') {
  9. ISSUE: line 53 character 57: Use '===' to compare with 'true'. - Evidence: if (document.getElementById('closeDR_speedy').checked == true) {
  10. ISSUE: line 70 character 23: Missing semicolon. - Evidence: var articlepage = ''
  11. ISSUE: line 81 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 closeDR_getPageText(title) {
  12. ISSUE: line 86 character 18: eval can be harmful. - Evidence: var response = eval('(' + req.responseText + ')');
  13. ISSUE: line 87 character 20: ['query'] is better written in dot notation. - Evidence: pageid = response['query']['pageids'][0];
  14. ISSUE: line 87 character 29: ['pageids'] is better written in dot notation. - Evidence: pageid = response['query']['pageids'][0];
  15. ISSUE: line 90 character 15: Variables should not be deleted. - Evidence: delete req;
  16. ISSUE: line 93 character 22: ['query'] is better written in dot notation. - Evidence: pagetext = response['query']['pages'][pageid]['revisions'][0]['*'];
  17. ISSUE: line 93 character 31: ['pages'] is better written in dot notation. - Evidence: pagetext = response['query']['pages'][pageid]['revisions'][0]['*'];
  18. ISSUE: line 93 character 48: ['revisions'] is better written in dot notation. - Evidence: pagetext = response['query']['pages'][pageid]['revisions'][0]['*'];
  19. ISSUE: line 94 character 13: Variables should not be deleted. - Evidence: delete req;
  20. ISSUE: line 98 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 closeDR_getToken(show) {
  21. ISSUE: line 105 character 18: eval can be harmful. - Evidence: var response = eval('(' + req.responseText + ')');
  22. ISSUE: line 106 character 20: ['query'] is better written in dot notation. - Evidence: pageid = response['query']['pageids'][0];
  23. ISSUE: line 106 character 29: ['pageids'] is better written in dot notation. - Evidence: pageid = response['query']['pageids'][0];
  24. ISSUE: line 107 character 19: ['query'] is better written in dot notation. - Evidence: token = response['query']['pages'][pageid]['edittoken'];
  25. ISSUE: line 107 character 28: ['pages'] is better written in dot notation. - Evidence: token = response['query']['pages'][pageid]['edittoken'];
  26. ISSUE: line 107 character 45: ['edittoken'] is better written in dot notation. - Evidence: token = response['query']['pages'][pageid]['edittoken'];
  27. ISSUE: line 108 character 13: Variables should not be deleted. - Evidence: delete req;
  28. ISSUE: line 114 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 closeDR_editPage(title, newtext, token, summary) {
  29. ISSUE: line 128 character 18: eval can be harmful. - Evidence: response = eval('(' + req.responseText + ')');
  30. ISSUE: line 130 character 21: ['edit'] is better written in dot notation. - Evidence: if (response['edit']['result'] == "Success") {
  31. ISSUE: line 130 character 29: ['result'] is better written in dot notation. - Evidence: if (response['edit']['result'] == "Success") {
  32. ISSUE: line 133 character 221: ['error'] is better written in dot notation. - Evidence: document.getElementById('closeDR_edit'+escape(title)).innerHTML = '<div style="color:red"><b>Edit failed on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a></b></div>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  33. ISSUE: line 133 character 230: ['code'] is better written in dot notation. - Evidence: document.getElementById('closeDR_edit'+escape(title)).innerHTML = '<div style="color:red"><b>Edit failed on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a></b></div>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  34. ISSUE: line 133 character 257: ['error'] is better written in dot notation. - Evidence: document.getElementById('closeDR_edit'+escape(title)).innerHTML = '<div style="color:red"><b>Edit failed on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a></b></div>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  35. ISSUE: line 133 character 266: ['info'] is better written in dot notation. - Evidence: document.getElementById('closeDR_edit'+escape(title)).innerHTML = '<div style="color:red"><b>Edit failed on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a></b></div>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  36. ISSUE: line 140 character 17: Variables should not be deleted. - Evidence: delete req;
  37. ISSUE: line 142 character 4: Missing semicolon. - Evidence: }
  38. ISSUE: line 143 character 19: Missing semicolon. - Evidence: req.send(params)
  39. ISSUE: line 145 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 closeDR_deletePage(title, token, summary, isredirect, retry) {
  40. ISSUE: line 161 character 18: eval can be harmful. - Evidence: response = eval('(' + req.responseText + ')');
  41. ISSUE: line 163 character 31: ['title'] is better written in dot notation. - Evidence: if (response['delete']['title']) {
  42. ISSUE: line 168 character 21: ['error'] is better written in dot notation. - Evidence: if (response['error']['code'] == "missingtitle") {
  43. ISSUE: line 168 character 30: ['code'] is better written in dot notation. - Evidence: if (response['error']['code'] == "missingtitle") {
  44. ISSUE: line 172 character 219: ['error'] is better written in dot notation. - Evidence: document.getElementById('closeDR_delete'+escape(title)).innerHTML = '<span style="color:red"><b>Deletion error on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'] + '</b></span>';
  45. ISSUE: line 172 character 228: ['code'] is better written in dot notation. - Evidence: document.getElementById('closeDR_delete'+escape(title)).innerHTML = '<span style="color:red"><b>Deletion error on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'] + '</b></span>';
  46. ISSUE: line 172 character 255: ['error'] is better written in dot notation. - Evidence: document.getElementById('closeDR_delete'+escape(title)).innerHTML = '<span style="color:red"><b>Deletion error on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'] + '</b></span>';
  47. ISSUE: line 172 character 264: ['info'] is better written in dot notation. - Evidence: document.getElementById('closeDR_delete'+escape(title)).innerHTML = '<span style="color:red"><b>Deletion error on <a href="/wiki/'+encodeURI(title)+'" title="'+title+'">'+title+'</a>. Error info:' +response['error']['code'] + ' : ' + response['error']['info'] + '</b></span>';
  48. ISSUE: line 177 character 17: Variables should not be deleted. - Evidence: delete req;
  49. ISSUE: line 179 character 4: Missing semicolon. - Evidence: }
  50. ISSUE: line 180 character 19: Missing semicolon. - Evidence: req.send(params)
  51. ISSUE: line 180 character 19: Too many errors. (95% scanned). - Evidence: undefined