Commons:User scripts/users namespace/reports/User:Darkwind/gadget-hotcat.js
This is the report page for User:Darkwind/gadget-hotcat.js. It is bot-maintained. All manual changes might be overwritten.
jshint edit
- ISSUE:
line 117 character 46
: ['creator'] is better written in dot notation. - Evidence:&& ( ns === wgNamespaceIds['creator']
- ISSUE:
line 118 character 46
: ['timedtext'] is better written in dot notation. - Evidence:|| ns === wgNamespaceIds['timedtext']
- ISSUE:
line 119 character 46
: ['institution'] is better written in dot notation. - Evidence:|| ns === wgNamespaceIds['institution']
- ISSUE:
line 209 character 55
: Use '!==' to compare with 'null'. - Evidence:var is_ie6 = /msie ([0-9]{1,}[\.0-9]{0,})/.exec(ua) != null && parseFloat(RegExp.$1) <= 6.0;
- ISSUE:
line 256 character 51
: eval can be harmful. - Evidence:if (settings.success) settings.success (eval ('(' + req.responseText + ')'));
- ISSUE:
line 272 character 71
: Unnecessary semicolon. - Evidence:function LoadTrigger () { this.initialize.apply (this, arguments); };
- ISSUE:
line 401 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 472 character 33
: Use '!==' to compare with '0'. - Evidence:if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
- ISSUE:
line 473 character 33
: Use '!==' to compare with '0'. - Evidence:if (href.indexOf (prefix) != 0 && prefix.substring(0, 2) == '//') prefix = document.location.protocol + prefix; // Protocol-relative wgServer?
- ISSUE:
line 536 character 55
: Use '!==' to compare with 'null'. - Evidence:while ((curr_match = cat_regex.exec (copiedtext)) != null) {
- ISSUE:
line 553 character 42
: Use '!==' to compare with 'null'. - Evidence:while (findCatsRE.exec(copiedtext) != null) index = findCatsRE.lastIndex;
- ISSUE:
line 591 character 19
: Use '===' to compare with 'null'. - Evidence:if (key == null) key = matches[0].match[2]; // Remember the category key, if any.
- ISSUE:
line 620 character 19
: 'matches' is already defined. - Evidence:var matches = find_category (wikitext, toAdd);
- ISSUE:
line 877 character 50
: Use '===' to compare with '0'. - Evidence:commitForm.wpWatchthis.checked = wgArticleId == 0 && watchCreate || watchEdit || pageWatched;
- ISSUE:
line 887 character 19
: 'i' is already defined. - Evidence:for (var i=0; i < deleted.length; i++) {
- ISSUE:
line 895 character 19
: 'i' is already defined. - Evidence:for (var i=0; i < added.length; i++) {
- ISSUE:
line 905 character 19
: 'i' is already defined. - Evidence:for (var i=0; i < changed.length; i++) {
- ISSUE:
line 956 character 16
: 'i' is already defined. - Evidence:for (var i = 0; i < toResolve.length; i++) {
- ISSUE:
line 980 character 26
: ['title'] is better written in dot notation. - Evidence:var cat = cats[c]['title'];
- ISSUE:
line 996 character 20
: ['ns'] is better written in dot notation. - Evidence:if ( lks[i]['ns'] == 14 // Category namespace
- ISSUE:
line 997 character 20
: ['title'] is better written in dot notation. - Evidence:&& lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
- ISSUE:
line 997 character 39
: ['title'] is better written in dot notation. - Evidence:&& lks[i]['title'] && lks[i]['title'].length > 0) // Name not empty
- ISSUE:
line 1000 character 27
: ['title'] is better written in dot notation. - Evidence:var match = lks[i]['title'];
- ISSUE:
line 1005 character 16
: 'j' is already defined. - Evidence:for (var j = 0; j < toResolve.length; j++) {
- ISSUE:
line 1013 character 48
: Use '!==' to compare with 'null'. - Evidence:titles[0] + (toResolve[j].currentKey != null ? '|' + toResolve[j].currentKey : "");
- ISSUE:
line 1067 character 32
: Use '!==' to compare with 'null'. - Evidence:if ( queryResult != null && queryResult.length == 2
- ISSUE:
line 1097 character 59
: Use '!==' to compare with '0'. - Evidence:if (titles[i].toLowerCase().indexOf (key) != 0) {
- ISSUE:
line 1163 character 74
: Unnecessary semicolon. - Evidence:function CategoryEditor () { this.initialize.apply (this, arguments); };
- ISSUE:
line 1196 character 32
: Use '===' to compare with '0'. - Evidence:if (expectedInput.length == 0 && actualValue.length > 0 || expectedInput.length > 0 && actualValue.indexOf (expectedInput) !== 0) {
- ISSUE:
line 1508 character 65
: Use '!==' to compare with 'null'. - Evidence:this.text.value = this.currentCategory + (this.currentKey != null ? '|' + this.currentKey : "");
- ISSUE:
line 1600 character 50
: Variables should not be deleted. - Evidence:window.setTimeout (function () {delete self;}, 10);
- ISSUE:
line 1652 character 35
: Use '!==' to compare with 'null'. - Evidence:|| HotCat.blacklist != null && HotCat.blacklist.test(v))
- ISSUE:
line 1664 character 43
: Use '!==' to compare with '0'. - Evidence:this.noCommit = (evtKeys (evt) & 1) != 0;
- ISSUE:
line 1750 character 31
: Use '!==' to compare with 'null'. - Evidence:|| HotCat.blacklist != null && HotCat.blacklist.test (this.currentCategory)
- ISSUE:
line 1844 character 27
: Use '!==' to compare with 'null'. - Evidence:if (this.text.value != null && this.text.value != v)
- ISSUE:
line 1864 character 20
: Variables should not be deleted. - Evidence:delete cb;
- ISSUE:
line 1907 character 59
: Use '!==' to compare with 'null'. - Evidence:this.ok.disabled = v.length > 0 && HotCat.blacklist != null && HotCat.blacklist.test (v);
- ISSUE:
line 1962 character 47
: Use '!==' to compare with '0'. - Evidence:if (this.lastInput.indexOf (queryKey) != 0) return;
- ISSUE:
line 1976 character 30
: Use '!==' to compare with 'null'. - Evidence:if (HotCat.blacklist != null) {
- ISSUE:
line 2003 character 20
: 'i' is already defined. - Evidence:for (var i = 0; i < titles.length; i++) {
- ISSUE:
line 2039 character 18
: 'i' is already defined. - Evidence:for (var i = 0 ; i < titles.length ; i++) {
- ISSUE:
line 2165 character 49
: Use '!==' to compare with '0'. - Evidence:if (dontModify || newVal.indexOf (actVal) != 0) return false;
- ISSUE:
line 2239 character 26
: Expected a 'break' statement before 'case'. - Evidence:case 38: dir = -1; // Up arrow
- ISSUE:
line 2240 character 40
: Expected a 'break' statement before 'case'. - Evidence:case 40: if (dir === 0) dir = 1; // Down arrow
- ISSUE:
line 2241 character 56
: Expected a 'break' statement before 'case'. - Evidence:case 33: if (dir === 0) dir = -HotCat.list_size; // Page up
- ISSUE:
line 2276 character 65
: Use '!==' to compare with '0'. - Evidence:if (curr >= 0 && curr < this.list.options.length && dir != 0) this.list.options[curr].selected = false;
- ISSUE:
line 2324 character 26
: ['HotCatDontAddToWatchlist'] is better written in dot notation. - Evidence:: (typeof (config['HotCatDontAddToWatchlist']) != 'undefined'
- ISSUE:
line 2325 character 21
: ['HotCatDontAddToWatchlist'] is better written in dot notation. - Evidence:? config['HotCatDontAddToWatchlist']
- ISSUE:
line 2332 character 26
: ['HotCatNoAutoCommit'] is better written in dot notation. - Evidence:: (typeof (config['HotCatNoAutoCommit']) != 'undefined'
- ISSUE:
line 2333 character 21
: ['HotCatNoAutoCommit'] is better written in dot notation. - Evidence:? config['HotCatNoAutoCommit']
- ISSUE:
line 2333 character 21
: Too many errors. (81% scanned). - Evidence:undefined