Commons:User scripts/users namespace/reports/User:Bryan/Scripts/ExtendedWatchlist/userwatch.js

This is the report page for User:Bryan/Scripts/ExtendedWatchlist/userwatch.js. It is bot-maintained. All manual changes might be overwritten.

jshint edit

  1. ISSUE: line 5 character 13: eval can be harmful. - Evidence: users = eval('(' + req.responseText + ')');
  2. ISSUE: line 6 character 27: The array literal notation [] is preferable. - Evidence: var users2 = new Array();
  3. ISSUE: line 9 character 79: Missing semicolon. - Evidence: qs = 'what=usercontribs&uccomments&format=json&titles=' + users2.join('|')
  4. ISSUE: line 16 character 19: Missing semicolon. - Evidence: req.send(null)
  5. ISSUE: line 17 character 10: eval can be harmful. - Evidence: wl = eval('(' + req.responseText + ')')['pages'];
  6. ISSUE: line 17 character 44: ['pages'] is better written in dot notation. - Evidence: wl = eval('(' + req.responseText + ')')['pages'];
  7. ISSUE: line 19 character 30: The array literal notation [] is preferable. - Evidence: var Watchlist = new Array()
  8. ISSUE: line 19 character 32: Missing semicolon. - Evidence: var Watchlist = new Array()
  9. ISSUE: line 20 character 10: Creating global 'for' variable. Should be 'for (var i ...'. - Evidence: for (i in wl) {
  10. ISSUE: line 21 character 19: ['contributions'] is better written in dot notation. - Evidence: if (!wl[i]['contributions']) continue;
  11. ISSUE: line 22 character 26: ['contributions'] is better written in dot notation. - Evidence: for (j=0; j<wl[i]['contributions'].length; j++) {
  12. ISSUE: line 23 character 29: ['contributions'] is better written in dot notation. - Evidence: var item = wl[i]['contributions'][j];
  13. ISSUE: line 24 character 33: The object literal notation {} is preferable. - Evidence: var rev = new Object();
  14. ISSUE: line 25 character 16: ['timestamp'] is better written in dot notation. - Evidence: rev['timestamp'] = parseTimestamp(item['timestamp']);
  15. ISSUE: line 25 character 51: ['timestamp'] is better written in dot notation. - Evidence: rev['timestamp'] = parseTimestamp(item['timestamp']);
  16. ISSUE: line 26 character 16: ['user'] is better written in dot notation. - Evidence: rev['user'] = wl[i]['title'].substr(5);
  17. ISSUE: line 26 character 32: ['title'] is better written in dot notation. - Evidence: rev['user'] = wl[i]['title'].substr(5);
  18. ISSUE: line 27 character 16: ['title'] is better written in dot notation. - Evidence: rev['title'] = item['*'];
  19. ISSUE: line 28 character 16: ['revid'] is better written in dot notation. - Evidence: rev['revid'] = item['revid'];
  20. ISSUE: line 28 character 32: ['revid'] is better written in dot notation. - Evidence: rev['revid'] = item['revid'];
  21. ISSUE: line 29 character 21: ['top'] is better written in dot notation. - Evidence: if (item['top'] == '') rev['top'] = '';
  22. ISSUE: line 29 character 29: Use '===' to compare with ''. - Evidence: if (item['top'] == '') rev['top'] = '';
  23. ISSUE: line 29 character 39: ['top'] is better written in dot notation. - Evidence: if (item['top'] == '') rev['top'] = '';
  24. ISSUE: line 30 character 29: Use '===' to compare with ''. - Evidence: if (item['new'] == '') rev['new'] = '';
  25. ISSUE: line 31 character 21: ['minor'] is better written in dot notation. - Evidence: if (item['minor'] == '') rev['minor'] = '';
  26. ISSUE: line 31 character 31: Use '===' to compare with ''. - Evidence: if (item['minor'] == '') rev['minor'] = '';
  27. ISSUE: line 31 character 41: ['minor'] is better written in dot notation. - Evidence: if (item['minor'] == '') rev['minor'] = '';
  28. ISSUE: line 32 character 21: ['comment'] is better written in dot notation. - Evidence: if (item['comment']) rev['comment'] = item['comment'];
  29. ISSUE: line 32 character 37: ['comment'] is better written in dot notation. - Evidence: if (item['comment']) rev['comment'] = item['comment'];
  30. ISSUE: line 32 character 55: ['comment'] is better written in dot notation. - Evidence: if (item['comment']) rev['comment'] = item['comment'];
  31. ISSUE: line 39 character 17: ['Userwatch'] is better written in dot notation. - Evidence: WatchlistPlugins['Userwatch'] = ewlUserwatch;
  32. ISSUE: line 42 character 37: Bad or unnecessary escaping. - Evidence: var user = new RegExp('^User.*?\:(.*?)(\/.*)?$').exec(wgPageName);
  33. ISSUE: line 50 character 21: eval can be harmful. - Evidence: users = eval('(' + req.responseText + ')');
  34. ISSUE: line 61 character 55: Script URL. - Evidence: addToolboxLink('javascript:void(setUserWatch(' + user.quote() + ', "watch"));', 'Watch user', 'ewl_watchuser');
  35. ISSUE: line 63 character 55: Script URL. - Evidence: addToolboxLink('javascript:void(setUserWatch(' + user.quote() + '));', 'Unwatch user', 'ewl_watchuser');
  36. ISSUE: line 80 character 10: Missing semicolon. - Evidence: }
  37. ISSUE: line 87 character 17: eval can be harmful. - Evidence: users = eval('(' + getText(doc.getElementById('wpTextbox1')) + ')');
  38. ISSUE: line 104 character 6: Missing semicolon. - Evidence: }
  39. ISSUE: line 107 character 6: Missing semicolon. - Evidence: }