Commons:User scripts/users namespace/reports/User:Kanonkas/moverevert2.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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

jshint[edit]

  1. ISSUE: line 3 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 addmoveRevertTab() {
  2. ISSUE: line 4 character 63: Script URL. - Evidence: mw.util.addPortletLink('p-cactions', 'javascript:moverevert2_main()', "Revert moves", "ca-moverevert", "Revert");
  3. ISSUE: line 8 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 moverevert2_main() {
  4. ISSUE: line 13 character 14: 'user' is already defined. - Evidence: var user = document.URL.substring(document.URL.indexOf('&user=')+6);
  5. ISSUE: line 15 character 14: 'user' is already defined. - Evidence: var user = encodeURIComponent(wgTitle);
  6. ISSUE: line 18 character 17: 'user' used out of scope. - Evidence: gwp_blockUser(user, btoken);
  7. ISSUE: line 20 character 26: 'user' used out of scope. - Evidence: moves = gwp_getMoveLog(user);
  8. 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 gwp_getToken() {
  9. ISSUE: line 31 character 18: eval can be harmful. - Evidence: var response = eval('(' + req.responseText + ')');
  10. ISSUE: line 32 character 20: ['query'] is better written in dot notation. - Evidence: pageid = response['query']['pageids'][0];
  11. ISSUE: line 32 character 29: ['pageids'] is better written in dot notation. - Evidence: pageid = response['query']['pageids'][0];
  12. ISSUE: line 33 character 19: ['query'] is better written in dot notation. - Evidence: token = response['query']['pages'][pageid]['edittoken'];
  13. ISSUE: line 33 character 28: ['pages'] is better written in dot notation. - Evidence: token = response['query']['pages'][pageid]['edittoken'];
  14. ISSUE: line 33 character 45: ['edittoken'] is better written in dot notation. - Evidence: token = response['query']['pages'][pageid]['edittoken'];
  15. ISSUE: line 34 character 13: Variables should not be deleted. - Evidence: delete req;
  16. ISSUE: line 38 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 gwp_getMoveLog(user) {
  17. ISSUE: line 40 character 138: Missing semicolon. - Evidence: var url = wgScriptPath + "/api.php?action=query&list=logevents&leuser="+user+"&letype=move&lelimit=50&leprop=title|details&format=json"
  18. ISSUE: line 44 character 18: eval can be harmful. - Evidence: var response = eval('(' + req.responseText + ')');
  19. ISSUE: line 45 character 24: The array literal notation [] is preferable. - Evidence: var moves = new Array();
  20. ISSUE: line 46 character 27: ['query'] is better written in dot notation. - Evidence: for (var i=0; i<response['query']['logevents'].length; i++) {
  21. ISSUE: line 46 character 36: ['logevents'] is better written in dot notation. - Evidence: for (var i=0; i<response['query']['logevents'].length; i++) {
  22. ISSUE: line 47 character 34: ['query'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  23. ISSUE: line 47 character 43: ['logevents'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  24. ISSUE: line 47 character 59: ['title'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  25. ISSUE: line 47 character 78: ['query'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  26. ISSUE: line 47 character 87: ['logevents'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  27. ISSUE: line 47 character 103: ['move'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  28. ISSUE: line 47 character 111: ['new_title'] is better written in dot notation. - Evidence: moves[i] = new Array(response['query']['logevents'][i]['title'], response['query']['logevents'][i]['move']['new_title']);
  29. ISSUE: line 49 character 13: Variables should not be deleted. - Evidence: delete req;
  30. ISSUE: line 54 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 gwp_revertMove(movefrom, moveto, token) {
  31. ISSUE: line 65 character 18: eval can be harmful. - Evidence: response = eval('(' + req.responseText + ')');
  32. ISSUE: line 67 character 21: ['move'] is better written in dot notation. - Evidence: if (response['move']['to']) {
  33. ISSUE: line 67 character 29: ['to'] is better written in dot notation. - Evidence: if (response['move']['to']) {
  34. ISSUE: line 71 character 142: ['error'] is better written in dot notation. - Evidence: document.getElementById('Gwp_move'+escape(movefrom)).innerHTML = 'Move from '+movefrom+' to '+moveto+' failed. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  35. ISSUE: line 71 character 151: ['code'] is better written in dot notation. - Evidence: document.getElementById('Gwp_move'+escape(movefrom)).innerHTML = 'Move from '+movefrom+' to '+moveto+' failed. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  36. ISSUE: line 71 character 178: ['error'] is better written in dot notation. - Evidence: document.getElementById('Gwp_move'+escape(movefrom)).innerHTML = 'Move from '+movefrom+' to '+moveto+' failed. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  37. ISSUE: line 71 character 187: ['info'] is better written in dot notation. - Evidence: document.getElementById('Gwp_move'+escape(movefrom)).innerHTML = 'Move from '+movefrom+' to '+moveto+' failed. Error info:' +response['error']['code'] + ' : ' + response['error']['info'];
  38. ISSUE: line 72 character 21: ['error'] is better written in dot notation. - Evidence: if (response['error']['code'] == "articleexists") {
  39. ISSUE: line 72 character 30: ['code'] is better written in dot notation. - Evidence: if (response['error']['code'] == "articleexists") {
  40. ISSUE: line 77 character 4: Missing semicolon. - Evidence: }
  41. ISSUE: line 78 character 19: Missing semicolon. - Evidence: req.send(params)
  42. ISSUE: line 80 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 gwp_getBlockToken() {
  43. ISSUE: line 89 character 14: eval can be harmful. - Evidence: response = eval('(' + req.responseText + ')');
  44. ISSUE: line 90 character 19: ['block'] is better written in dot notation. - Evidence: token = response['block']['blocktoken'];
  45. ISSUE: line 90 character 28: ['blocktoken'] is better written in dot notation. - Evidence: token = response['block']['blocktoken'];
  46. ISSUE: line 91 character 13: Variables should not be deleted. - Evidence: delete req;
  47. ISSUE: line 96 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 gwp_blockUser(user, token) {
  48. ISSUE: line 107 character 18: eval can be harmful. - Evidence: response = eval('(' + req.responseText + ')');
  49. ISSUE: line 109 character 65: ['block'] is better written in dot notation. - Evidence: document.getElementById('blocking').innerHTML+= response['block']['user']+" has been blocked";
  50. ISSUE: line 109 character 74: ['user'] is better written in dot notation. - Evidence: document.getElementById('blocking').innerHTML+= response['block']['user']+" has been blocked";
  51. ISSUE: line 109 character 74: Too many errors. (77% scanned). - Evidence: undefined