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 (8 issues)

1
(function($) {
2
3
    var entityMap = {
4
      '&': '&',
5
      '<': '&lt;',
6
      '>': '&gt;',
7
      '"': '&quot;',
8
      "'": '&#39;',
9
      '/': '&#x2F;',
10
      '`': '&#x60;',
11
      '=': '&#x3D;'
12
    };
13
    
14
    function escapeHtml(string) {
15
      return String(string).replace(/[&<>"'`=\/]/g, function (s) {
16
        return entityMap[s];
17
      });
18
    }
19
20
	function podlove_init_color_buttons() {
21
        jQuery(document).ready( function($) {
22
            var params = {
23
                change: function(e, ui) {
24
                    $( e.target ).val( ui.color.toString() );
25
                    $( e.target ).trigger('change'); // enable widget "Save" button
26
                },
27
            }
28
29
            $('.podlove_subscribe_button_color').not('[id*="__i__"]').wpColorPicker( params );
30
        })
31
	}
32
33
	$( document ).ready( function() {
34
35
		$("#Podlove_cover_image_select").on( 'click', function(event) {
36
			podlove_cover_image_selector = wp.media.frames.customHeader = wp.media( {
0 ignored issues
show
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
			    } );
46
			podlove_cover_image_selector.open();
47
48
			podlove_cover_image_selector.on('select', function() {
49
				var podcast_image_url = podlove_cover_image_selector.state().get('selection').first().toJSON().url;
50
				$("#podlove-button-cover").val(podcast_image_url);
51
				$("#podlove-button-cover").trigger('change');
52
			});
53
		} );
54
55
		$(document).ready(function () {
56
		    podlove_init_color_buttons();
57
58
		    jQuery(document).on('widget-updated', podlove_init_color_buttons);
59
		    jQuery(document).on('widget-added', podlove_init_color_buttons);
60
61
		    // re-init after saving configs
62
		    jQuery(document).on('ajaxComplete', function(e){
63
		        podlove_init_color_buttons();
64
		    });
65
		})
66
67
		var feed_counter = 0;
68
		var source = $("#feed_line_template").html();
69
70
		$(".add_feed").on( 'click', function () {
71
			add_new_feed();
72
		} );
73
74
		if ( window.feeds !== undefined ) {
75
			$.each( feeds, function (index, feed) {
0 ignored issues
show
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);
77
			} );
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);
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...
88
			new_row.find("input:first").focus();
89
90
			$(".podlove-icon-remove").on( 'click', function () {
91
				$(this).closest("tr").remove();
92
			} );
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...
99
			row = row.replace( /\{\{id\}\}/g, feed_counter );
100
			if ( feed.itunesfeedid == null ) {
101
				row = row.replace( /\{\{itunesfeedid\}\}/g, '' );
102
			} else {
103
				row = row.replace( /\{\{itunesfeedid\}\}/g, escapeHtml(feed.itunesfeedid) );
104
			}
105
106
			$("#feeds_table_body").append(row);
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...
109
			new_row.find('select.podlove-media-format option[value="' + escapeHtml(feed.format) + '"]').attr('selected',true);
110
111
			$(".podlove-icon-remove").on( 'click', function () {
112
				$(this).closest("tr").remove();
113
			} );
114
115
			feed_counter++;
116
		}
117
118
	} );
119
}(jQuery));