Commons:User scripts/users namespace/reports/User:Kanonkas/moverevert2.js
This is the report page for User:Kanonkas/moverevert2.js. It is bot-maintained. All manual changes might be overwritten.
jshint edit
- 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() {
- ISSUE:
line 4 character 63
: Script URL. - Evidence:mw.util.addPortletLink('p-cactions', 'javascript:moverevert2_main()', "Revert moves", "ca-moverevert", "Revert");
- 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() {
- ISSUE:
line 13 character 14
: 'user' is already defined. - Evidence:var user = document.URL.substring(document.URL.indexOf('&user=')+6);
- ISSUE:
line 15 character 14
: 'user' is already defined. - Evidence:var user = encodeURIComponent(wgTitle);
- ISSUE:
line 18 character 17
: 'user' used out of scope. - Evidence:gwp_blockUser(user, btoken);
- ISSUE:
line 20 character 26
: 'user' used out of scope. - Evidence:moves = gwp_getMoveLog(user);
- 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() {
- ISSUE:
line 31 character 18
: eval can be harmful. - Evidence:var response = eval('(' + req.responseText + ')');
- ISSUE:
line 32 character 20
: ['query'] is better written in dot notation. - Evidence:pageid = response['query']['pageids'][0];
- ISSUE:
line 32 character 29
: ['pageids'] is better written in dot notation. - Evidence:pageid = response['query']['pageids'][0];
- ISSUE:
line 33 character 19
: ['query'] is better written in dot notation. - Evidence:token = response['query']['pages'][pageid]['edittoken'];
- ISSUE:
line 33 character 28
: ['pages'] is better written in dot notation. - Evidence:token = response['query']['pages'][pageid]['edittoken'];
- ISSUE:
line 33 character 45
: ['edittoken'] is better written in dot notation. - Evidence:token = response['query']['pages'][pageid]['edittoken'];
- ISSUE:
line 34 character 13
: Variables should not be deleted. - Evidence:delete req;
- 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) {
- 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"
- ISSUE:
line 44 character 18
: eval can be harmful. - Evidence:var response = eval('(' + req.responseText + ')');
- ISSUE:
line 45 character 24
: The array literal notation [] is preferable. - Evidence:var moves = new Array();
- ISSUE:
line 46 character 27
: ['query'] is better written in dot notation. - Evidence:for (var i=0; i<response['query']['logevents'].length; i++) {
- ISSUE:
line 46 character 36
: ['logevents'] is better written in dot notation. - Evidence:for (var i=0; i<response['query']['logevents'].length; i++) {
- 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']);
- 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']);
- 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']);
- 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']);
- 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']);
- 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']);
- 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']);
- ISSUE:
line 49 character 13
: Variables should not be deleted. - Evidence:delete req;
- 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) {
- ISSUE:
line 65 character 18
: eval can be harmful. - Evidence:response = eval('(' + req.responseText + ')');
- ISSUE:
line 67 character 21
: ['move'] is better written in dot notation. - Evidence:if (response['move']['to']) {
- ISSUE:
line 67 character 29
: ['to'] is better written in dot notation. - Evidence:if (response['move']['to']) {
- 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'];
- 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'];
- 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'];
- 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'];
- ISSUE:
line 72 character 21
: ['error'] is better written in dot notation. - Evidence:if (response['error']['code'] == "articleexists") {
- ISSUE:
line 72 character 30
: ['code'] is better written in dot notation. - Evidence:if (response['error']['code'] == "articleexists") {
- ISSUE:
line 77 character 4
: Missing semicolon. - Evidence:}
- ISSUE:
line 78 character 19
: Missing semicolon. - Evidence:req.send(params)
- 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() {
- ISSUE:
line 89 character 14
: eval can be harmful. - Evidence:response = eval('(' + req.responseText + ')');
- ISSUE:
line 90 character 19
: ['block'] is better written in dot notation. - Evidence:token = response['block']['blocktoken'];
- ISSUE:
line 90 character 28
: ['blocktoken'] is better written in dot notation. - Evidence:token = response['block']['blocktoken'];
- ISSUE:
line 91 character 13
: Variables should not be deleted. - Evidence:delete req;
- 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) {
- ISSUE:
line 107 character 18
: eval can be harmful. - Evidence:response = eval('(' + req.responseText + ')');
- ISSUE:
line 109 character 65
: ['block'] is better written in dot notation. - Evidence:document.getElementById('blocking').innerHTML+= response['block']['user']+" has been blocked";
- ISSUE:
line 109 character 74
: ['user'] is better written in dot notation. - Evidence:document.getElementById('blocking').innerHTML+= response['block']['user']+" has been blocked";
- ISSUE:
line 109 character 74
: Too many errors. (77% scanned). - Evidence:undefined