<commit_before>(function(){

	$(document).ready(function() {

		function impersonate(userid) {
			$.post(
				OC.generateUrl('apps/impersonate/user'),
				{ userid: userid }
			).done(function( result ) {
				window.location = OC.generateUrl('apps/files');
			}).fail(function( result ) {
				OC.dialogs.alert(result.responseJSON.message, t('impersonate', 'Could not impersonate user'));
			});
		}

		$('<th>&nbsp;</th>').insertAfter('#userlist #headerName');
		$('<td><a class="action permanent impersonate" href="#" title="' +
			t('impersonate', 'Impersonate') + '">' +
			'<img class="svg permanent action" src="/core/img/actions/user.svg" />' +
			'</a></td>')
			.insertAfter('#userlist .name');

		$('#userlist').on('click', '.impersonate', function(e) {
			var userid = $(e.srcElement).parents('tr').find('.name').text();
			OCdialogs.confirm(
				t('impersonate', 'With great power comes great responsibility!'),
				t('impersonate', 'Are you sure you want to impersonate {userid}?',
					{userid: userid} ),
				function(result) {
					if (result) {
						impersonate(userid);
					}
				},
				true
			);
		});

	});

})();<commit_msg>use this instead of e.srcElement, fix image path<commit_after>(function(){

	$(document).ready(function() {

		function impersonate(userid) {
			$.post(
				OC.generateUrl('apps/impersonate/user'),
				{ userid: userid }
			).done(function( result ) {
				window.location = OC.generateUrl('apps/files');
			}).fail(function( result ) {
				OC.dialogs.alert(result.responseJSON.message, t('impersonate', 'Could not impersonate user'));
			});
		}

		$('<th>&nbsp;</th>').insertAfter('#userlist #headerName');
		$('<td><a class="action permanent impersonate" href="#" title="' +
			t('impersonate', 'Impersonate') + '">' +
			'<img class="svg permanent action" src="' + OC.imagePath('core','actions/user.svg') + '" />' +
			'</a></td>')
			.insertAfter('#userlist .name');

		$('#userlist').on('click', '.impersonate', function() {
			var userid = $(this).parents('tr').find('.name').text();
			OCdialogs.confirm(
				t('impersonate', 'With great power comes great responsibility!'),
				t('impersonate', 'Are you sure you want to impersonate {userid}?',
					{userid: userid} ),
				function(result) {
					if (result) {
						impersonate(userid);
					}
				},
				true
			);
		});

	});

})();
{'fraction_non_alphanumeric': 0.21443827424177703, 'fraction_numerical': 0.0, 'mean_word_length': 3.7991803278688523, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5065424', 'n_tokens_mistral': 937, 'n_tokens_neox': 776, 'n_words': 144}