Commons:User scripts/users namespace/reports/User:Docu/t.js
This is the report page for User:Docu/t.js. It is bot-maintained. All manual changes might be overwritten.
jshint edit
- ISSUE:
line 126 character 60
: ['creator'] is better written in dot notation. - Evidence:&& ( wgNamespaceNumber == wgNamespaceIds['creator']
- ISSUE:
line 127 character 60
: ['timedtext'] is better written in dot notation. - Evidence:|| wgNamespaceNumber == wgNamespaceIds['timedtext']
- ISSUE:
line 206 character 59
: Use '===' to compare with '0'. - Evidence:((wgServer.indexOf( "https://secure.wikimedia.org") == 0)
- ISSUE:
line 226 character 5
: 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 autoLocalize (namespaceNumber, fallback) {
- ISSUE:
line 229 character 34
: Use '===' to compare with '0'. - Evidence:if (!name || name.length == 0) return "";
- ISSUE:
line 247 character 90
: Missing semicolon. - Evidence:if (fallback && canonical != fallback) regexp += '|' + create_regexp_str (fallback)
- ISSUE:
line 290 character 31
: Use '===' to compare with '0'. - Evidence:if (href.indexOf (script) == 0 || href.indexOf (wgServer + script) == 0) {
- ISSUE:
line 290 character 72
: Use '===' to compare with '0'. - Evidence:if (href.indexOf (script) == 0 || href.indexOf (wgServer + script) == 0) {
- ISSUE:
line 296 character 33
: Use '!==' to compare with '0'. - Evidence:if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
- ISSUE:
line 297 character 33
: Use '===' to compare with '0'. - Evidence:if (href.indexOf (prefix) == 0)
- ISSUE:
line 306 character 28
: Use '===' to compare with '0'. - Evidence:if (!str || str.length == 0) return str;
- ISSUE:
line 318 character 68
: Bad or unnecessary escaping. - Evidence:new RegExp ('\\[\\[\\s*(?:' + HotCat.category_regexp + ')\\s*:\[^\\]\]+\\]\\]', 'g');
- ISSUE:
line 318 character 74
: Bad or unnecessary escaping. - Evidence:new RegExp ('\\[\\[\\s*(?:' + HotCat.category_regexp + ')\\s*:\[^\\]\]+\\]\\]', 'g');
- ISSUE:
line 347 character 55
: Use '!==' to compare with 'null'. - Evidence:while ((curr_match = cat_regex.exec (copiedtext)) != null) {
- ISSUE:
line 362 character 42
: Use '!==' to compare with 'null'. - Evidence:while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
- ISSUE:
line 375 character 38
: Use '===' to compare with '0'. - Evidence:if (!matches || matches.length == 0) {
- ISSUE:
line 387 character 19
: Use '===' to compare with 'null'. - Evidence:if (key == null) key = matches[0].match[2]; // Remember the category key, if any.
- ISSUE:
line 397 character 66
: Use '===' to compare with '0'. - Evidence:if (i >= 0 && before.charAt (i) == '\n' && (after.length == 0 || j < after.length && after.charAt (j) == '\n'))
- ISSUE:
line 416 character 19
: 'matches' is already defined. - Evidence:var matches = find_category (wikitext, toAdd);
- ISSUE:
line 456 character 24
: Use '===' to compare with '0'. - Evidence:if (toAdd.length == 0) toAdd = null;
- ISSUE:
line 460 character 27
: Use '===' to compare with '0'. - Evidence:if (toRemove.length == 0) toRemove = null;
- ISSUE:
line 563 character 24
: eval can be harmful. - Evidence:var json = eval ('(' + request.responseText + ')');
- ISSUE:
line 623 character 21
: Use '!==' to compare with '0'. - Evidence:if (wgArticleId != 0) {
- ISSUE:
line 631 character 18
: eval can be harmful. - Evidence:setPage (eval ('(' + request.responseText + ')'));
- ISSUE:
line 672 character 82
: Use '===' to compare with '0'. - Evidence:if (!editors[i].originalCategory || editors[i].originalCategory.length == 0) {
- ISSUE:
line 689 character 17
: Use '===' to compare with '0'. - Evidence:if (changes == 0) return;
- ISSUE:
line 693 character 50
: Use '===' to compare with '0'. - Evidence:commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
- ISSUE:
line 703 character 19
: 'i' is already defined. - Evidence:for (var i=0; i < deleted.length; i++) {
- ISSUE:
line 711 character 19
: 'i' is already defined. - Evidence:for (var i=0; i < added.length; i++) {
- ISSUE:
line 721 character 19
: 'i' is already defined. - Evidence:for (var i=0; i < changed.length; i++) {
- ISSUE:
line 775 character 16
: 'i' is already defined. - Evidence:for (var i = 0; i < toResolve.length; i++) {
- ISSUE:
line 793 character 38
: eval can be harmful. - Evidence:resolveRedirects (toResolve, eval ('(' + request.responseText + ')'));
- ISSUE:
line 808 character 26
: ['title'] is better written in dot notation. - Evidence:var cat = cats[c]['title'];
- ISSUE:
line 821 character 28
: Use '===' to compare with '0'. - Evidence:if (!lks || lks.length == 0) return;
- ISSUE:
line 824 character 20
: ['ns'] is better written in dot notation. - Evidence:if ( lks[i]['ns'] == 14 // Category namespace
- ISSUE:
line 825 character 20
: ['title'] is better written in dot notation. - Evidence:&& lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
- ISSUE:
line 825 character 39
: ['title'] is better written in dot notation. - Evidence:&& lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
- ISSUE:
line 828 character 27
: ['title'] is better written in dot notation. - Evidence:var match = lks[i]['title'];
- ISSUE:
line 841 character 48
: Use '!==' to compare with 'null'. - Evidence:titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
- ISSUE:
line 857 character 26
: Use '===' to compare with '0'. - Evidence:if (toResolve.length == 0) {
- ISSUE:
line 896 character 31
: eval can be harmful. - Evidence:var queryResult = eval ('(' + responseText + ')');
- ISSUE:
line 897 character 32
: Use '!==' to compare with 'null'. - Evidence:if ( queryResult != null && queryResult.length == 2
- ISSUE:
line 923 character 31
: eval can be harmful. - Evidence:var queryResult = eval ('(' + responseText + ')');
- ISSUE:
line 929 character 59
: Use '!==' to compare with '0'. - Evidence:if (titles[i].toLowerCase().indexOf (key) != 0) {
- ISSUE:
line 944 character 31
: eval can be harmful. - Evidence:var queryResult = eval ('(' + responseText + ')');
- ISSUE:
line 960 character 31
: eval can be harmful. - Evidence:var queryResult = eval ('(' + responseText + ')');
- ISSUE:
line 985 character 74
: Unnecessary semicolon. - Evidence:function CategoryEditor () { this.initialize.apply (this, arguments); };
- ISSUE:
line 1124 character 35
: Use '===' to compare with '0'. - Evidence:if (this.keyCount == 0) return this.processKey (evt);
- ISSUE:
line 1273 character 65
: Use '!==' to compare with 'null'. - Evidence:this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
- ISSUE:
line 1295 character 20
: Use '===' to compare with '0'. - Evidence:if (v.length == 0) return result;
- ISSUE:
line 1295 character 20
: Too many errors. (51% scanned). - Evidence:undefined