<commit_before>( function( mw, $ ) {
	
mw.AdLoader = {
	/**
	 * Get ad display configuration object from a url
	 * 
	 * @param {string} adUrl
	 * 		The url which contains the xml ad payload
	 * @param {function} callback
	 * 		Function called with ad payload once ad content is loaded. 
	 */
	load: function( adUrl, callback ){
		var _this = this;
		// First try to directly load the ad url:
		try{
			$.ajax({
				url: adUrl,
				success: function( data ) {<commit_msg>added a check for cross xhr before we even try the direct request<commit_after>( function( mw, $ ) {
	
mw.AdLoader = {
	/**
	 * Get ad display configuration object from a url
	 * 
	 * @param {string} adUrl
	 * 		The url which contains the xml ad payload
	 * @param {function} callback
	 * 		Function called with ad payload once ad content is loaded. 
	 */
	load: function( adUrl, callback ){
		var _this = this;
		// See if we should even try to request via xhr:
		if ( !('withCredentials' in new XMLHttpRequest()) && !(typeof XDomainRequest !== "undefined")){
			_this.loadFromProxy( adUrl, callback );
			return ;
		}
		// First try to directly load the ad url:
		try {
			$.ajax({
				url: adUrl,
				success: function( data ) {
{'fraction_non_alphanumeric': 0.10990840965861781, 'fraction_numerical': 0.0, 'mean_word_length': 2.9539473684210527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1861042', 'n_tokens_mistral': 413, 'n_tokens_neox': 359, 'n_words': 150}