GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (1495)

js/admin.js (115 issues)

1
(function($) {
0 ignored issues
show
This file is missing a doc comment.
Loading history...
2
3
    var entityMap = {
4
      '&': '&',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
5
      '<': '&lt;',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
6
      '>': '&gt;',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
7
      '"': '&quot;',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
8
      "'": '&#39;',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
9
      '/': '&#x2F;',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
10
      '`': '&#x60;',
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
11
      '=': '&#x3D;'
0 ignored issues
show
Found precision alignment of 2 spaces.
Loading history...
12
    };
13
    
14
    function escapeHtml(string) {
15
      return String(string).replace(/[&<>"'`=\/]/g, function (s) {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
Found precision alignment of 2 spaces.
Loading history...
Opening statement of multi-line function call not indented correctly; expected 4 spaces but found 6
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
16
        return entityMap[s];
0 ignored issues
show
This line of the multi-line function call does not seem to be indented correctly. Expected 10 spaces, but found 8.
Loading history...
17
      });
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
Found precision alignment of 2 spaces.
Loading history...
18
    }
19
20
	function podlove_init_color_buttons() {
21
        jQuery(document).ready( function($) {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
22
            var params = {
23
                change: function(e, ui) {
24
                    $( e.target ).val( ui.color.toString() );
25
                    $( e.target ).trigger('change'); // enable widget "Save" button
0 ignored issues
show
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
26
                },
27
            }
28
29
            $('.podlove_subscribe_button_color').not('[id*="__i__"]').wpColorPicker( params );
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
30
        })
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
31
	}
32
33
	$( document ).ready( function() {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
34
35
		$("#Podlove_cover_image_select").on( 'click', function(event) {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
The parameter event is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
36
			podlove_cover_image_selector = wp.media.frames.customHeader = wp.media( {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
The variable wp seems to be never declared. If this is a global, consider adding a /** global: wp */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
The variable podlove_cover_image_selector seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.podlove_cover_image_selector.
Loading history...
37
					title: i18n.media_library,
0 ignored issues
show
The variable i18n seems to be never declared. If this is a global, consider adding a /** global: i18n */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
38
					library: {
39
						type: 'image'
40
					},
41
					button: {
42
						text: i18n.use_for
43
			   		},
44
			   		multiple: false
45
			    } );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
This line of the multi-line function call does not seem to be indented correctly. Expected 12 spaces, but found 16.
Loading history...
46
			podlove_cover_image_selector.open();
47
48
			podlove_cover_image_selector.on('select', function() {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
49
				var podcast_image_url = podlove_cover_image_selector.state().get('selection').first().toJSON().url;
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
50
				$("#podlove-button-cover").val(podcast_image_url);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
51
				$("#podlove-button-cover").trigger('change');
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
52
			});
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
53
		} );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
54
55
		$(document).ready(function () {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
56
		    podlove_init_color_buttons();
57
58
		    jQuery(document).on('widget-updated', podlove_init_color_buttons);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
59
		    jQuery(document).on('widget-added', podlove_init_color_buttons);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
60
61
		    // re-init after saving configs
0 ignored issues
show
Inline comments must end in full-stops, exclamation marks, or question marks
Loading history...
62
		    jQuery(document).on('ajaxComplete', function(e){
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
63
		        podlove_init_color_buttons();
64
		    });
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
65
		})
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
66
67
		var feed_counter = 0;
68
		var source = $("#feed_line_template").html();
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
69
70
		$(".add_feed").on( 'click', function () {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
71
			add_new_feed();
72
		} );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
73
74
		if ( window.feeds !== undefined ) {
75
			$.each( feeds, function (index, feed) {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
The variable feeds seems to be never declared. If this is a global, consider adding a /** global: feeds */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
76
				add_existing_feed(feed);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
77
			} );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
78
		}
79
80
		function add_new_feed() {
81
			row = source.replace( /\{\{url\}\}/g, '' );
0 ignored issues
show
The variable row seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.row.
Loading history...
82
			row = row.replace( /\{\{itunesfeedid\}\}/g, '' );
83
			row = row.replace( /\{\{id\}\}/g, feed_counter );
84
85
			$("#feeds_table_body").append(row);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
86
87
			new_row = $("#feeds_table_body tr:last");
0 ignored issues
show
The variable new_row seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.new_row.
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
88
			new_row.find("input:first").focus();
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
89
90
			$(".podlove-icon-remove").on( 'click', function () {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
91
				$(this).closest("tr").remove();
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
92
			} );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
93
94
			feed_counter++;
95
		}
96
97
		function add_existing_feed( feed ) {
98
			row = source.replace( /\{\{url\}\}/g, escapeHtml(feed.url) );
0 ignored issues
show
The variable row seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.row.
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
99
			row = row.replace( /\{\{id\}\}/g, feed_counter );
100
			if ( feed.itunesfeedid == null ) {
0 ignored issues
show
Comparing feed.itunesfeedid to null using the == operator is not safe. Consider using === instead.
Loading history...
101
				row = row.replace( /\{\{itunesfeedid\}\}/g, '' );
102
			} else {
103
				row = row.replace( /\{\{itunesfeedid\}\}/g, escapeHtml(feed.itunesfeedid) );
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
104
			}
105
106
			$("#feeds_table_body").append(row);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
107
108
			new_row = $("#feeds_table_body tr:last");
0 ignored issues
show
The variable new_row seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.new_row.
Loading history...
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
109
			new_row.find('select.podlove-media-format option[value="' + escapeHtml(feed.format) + '"]').attr('selected',true);
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
110
111
			$(".podlove-icon-remove").on( 'click', function () {
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
112
				$(this).closest("tr").remove();
0 ignored issues
show
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
113
			} );
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
114
115
			feed_counter++;
116
		}
117
118
	} );
0 ignored issues
show
Expected 0 blank lines before closing brace of nested function; 1 found
Loading history...
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
119
}(jQuery));