Commons:User scripts/users namespace/reports/User:Arbitrarily0/custom-hotcat.js
This is the report page for User:Arbitrarily0/custom-hotcat.js. It is bot-maintained. All manual changes might be overwritten.
jshint edit
- ISSUE:
line 40 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 hotcat_remove_upload ( text ) {
- ISSUE:
line 52 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 hotcat_check_upload () {
- ISSUE:
line 54 character 88
: Use '===' to compare with 'null'. - Evidence:if ( wgNamespaceNumber != -1 || wgCanonicalSpecialPageName != "Upload" || wgUserName == null) return ;
- ISSUE:
line 58 character 10
: Use '===' to compare with 'null'. - Evidence:if (ip == null) return;
- ISSUE:
line 82 character 13
: Use '===' to compare with 'null'. - Evidence:if (label == null)
- ISSUE:
line 119 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 hotcat_on_upload () {
- ISSUE:
line 122 character 13
: Use '!==' to compare with 'null'. - Evidence:if (input != null) hotcat_closeform ();
- ISSUE:
line 128 character 19
: eval can be harmful. - Evidence:do_submit = eval (hotcat_old_onsubmit);
- ISSUE:
line 142 character 21
: Bad or unnecessary escaping. - Evidence:var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
- ISSUE:
line 142 character 23
: Bad or unnecessary escaping. - Evidence:var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
- ISSUE:
line 142 character 84
: Bad or unnecessary escaping. - Evidence:var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
- ISSUE:
line 142 character 86
: Bad or unnecessary escaping. - Evidence:var new_cat = "\[\[" + hotcat_canonical + ":" + t + (key ? "|" + key : "") + "\]\]" ;
- ISSUE:
line 149 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 hotcat () {
- ISSUE:
line 153 character 52
: ['creator'] is better written in dot notation. - Evidence:&& ( wgNamespaceNumber == wgNamespaceIds['creator']
- ISSUE:
line 154 character 52
: ['timedtext'] is better written in dot notation. - Evidence:|| wgNamespaceNumber == wgNamespaceIds['timedtext']
- ISSUE:
line 162 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 create_regexp_str (name)
- ISSUE:
line 164 character 32
: Use '===' to compare with '0'. - Evidence:if (!name || name.length == 0) return "";
- ISSUE:
line 198 character 57
: Expected a 'break' statement before 'case'. - Evidence:container = document.getElementById ('quickbar');
- ISSUE:
line 212 character 52
: Use '!==' to compare with 'null'. - Evidence:return document.getElementById ('ca-edit') != null;
- ISSUE:
line 231 character 20
: Use '===' to compare with 'null'. - Evidence:if (visible_cats == null) {
- ISSUE:
line 234 character 21
: Use '===' to compare with 'null'. - Evidence:if (hidden_cats == null) {
- ISSUE:
line 269 character 43
: Use '!==' to compare with 'null'. - Evidence:&& UploadForm.previous_hotcat_state != null)
- ISSUE:
line 273 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 hotcat_append_add_span ( catline ) {
- ISSUE:
line 286 character 2
: Missing semicolon. - Evidence:}
- ISSUE:
line 288 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 hotcat_is_on_blacklist ( cat_title ) {
- ISSUE:
line 297 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 hotcat_modify_span ( span , i ) {
- ISSUE:
line 318 character 31
: Use '!==' to compare with '0'. - Evidence:if (href.indexOf (prefix) != 0) prefix = wgServer + prefix; // Fully expanded URL?
- ISSUE:
line 319 character 31
: Use '===' to compare with '0'. - Evidence:if (href.indexOf (prefix) == 0) {
- ISSUE:
line 340 character 51
: Script URL. - Evidence:modify_link.href = "javascript:hotcat_modify(\"" + mod_id + "\");" ;
- ISSUE:
line 348 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 hotcat_modify_existing ( catline ) {
- ISSUE:
line 355 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 hotcat_getEvt (evt) {
- ISSUE:
line 359 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 hotcat_evt2node (evt) {
- ISSUE:
line 371 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 hotcat_evtkeys (evt) {
- ISSUE:
line 387 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 hotcat_killEvt (evt)
- ISSUE:
line 400 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 hotcat_remove (evt) {
- ISSUE:
line 421 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 hotcatGetParamValue(paramName, h) {
- ISSUE:
line 434 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 hotcat_find_category (wikitext, category)
- ISSUE:
line 445 character 26
: The array literal notation [] is preferable. - Evidence:var result = new Array ();
- ISSUE:
line 447 character 51
: Use '!==' to compare with 'null'. - Evidence:while ((curr_match = cat_regex.exec (wikitext)) != null) {
- ISSUE:
line 454 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 hotcat_find_insertionpoint (wikitext)
- ISSUE:
line 463 character 72
: Bad or unnecessary escaping. - Evidence:var re = new RegExp("\\[\\[\\s*(?:" + hotcat_cnames_regexp + ")\\s*:\[^\\]\]+\\]\\]", "ig" );
- ISSUE:
line 463 character 78
: Bad or unnecessary escaping. - Evidence:var re = new RegExp("\\[\\[\\s*(?:" + hotcat_cnames_regexp + ")\\s*:\[^\\]\]+\\]\\]", "ig" );
- ISSUE:
line 465 character 30
: Use '!==' to compare with 'null'. - Evidence:while( re.exec(copiedtext) != null ) index = re.lastIndex;
- ISSUE:
line 475 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 hotcat_check_action () {
- ISSUE:
line 479 character 27
: The array literal notation [] is preferable. - Evidence:var summary = new Array () ;
- ISSUE:
line 493 character 15
: Use '!==' to compare with 'null'. - Evidence:if (cat_key != null) cat_key = '|' + cat_key;
- ISSUE:
line 494 character 14
: Use '!==' to compare with 'null'. - Evidence:if (cat_rm != null && cat_rm.length > 0) {
- ISSUE:
line 496 character 36
: Use '===' to compare with '0'. - Evidence:if (!matches || matches.length == 0) {
- ISSUE:
line 504 character 19
: Use '!==' to compare with 'null'. - Evidence:if (cat_add != null && cat_add.length > 0 && matches[0].match.length > 1) {
- ISSUE:
line 506 character 21
: Use '===' to compare with 'null'. - Evidence:if (cat_key == null) cat_key = matches[0].match[2]; // Remember the category key, if any.
- ISSUE:
line 506 character 21
: Too many errors. (42% scanned). - Evidence:undefined