<commit_before>
setTimeout(function(){
  removeAD();
},1000);

function removeAD(){
	if(/.*\.qq\.com.*/.test(location.href)){//qq.coms
	   $("div[bosszone='rightAD'],.l_qq_com").remove();
	}
	
	//$("iframe").remove();

	$("[class]").each(function(){
	  var classArr= this.className.split(" ");
	  for(var i in classArr){
		var name=classArr[i];
		if(name&&test(name)){//判断为广告就移除
			 $(this).remove();
		}
	  }
	})

	$("[id]").each(function(){
		var id= this.id;
		if(id&&test(id)){//判断为广告就移除
			 $(this).remove();
		}
	});
}

function test(val){
	val=$.trim(val);
	if(isAllow(val)){
	  return false;
	}
	if(val=='sina_keyword_ad_area2')
	var arr=["_ad$","^ad_",".*_ad_.*","-ad$","^ad-",".*-ad-.*"];
	for(var i in arr){
	  if(new RegExp(arr[i],"i").test(val)){
		return true;
	  }
	}
	return false;
}

function isAllow(val){
	var arr=["sina_keyword_ad_area2"];
	for(var i in arr){
	  if( val==arr[i]){
		return true;
	  }
	}
	return false;<commit_msg>删除新浪广告<commit_after>
setTimeout(function(){
  removeAD();
},1000);

function removeAD(){
	if(/.*\.qq\.com.*/.test(location.href)){//qq.coms
	   $("div[bosszone='rightAD'],.l_qq_com").remove();
	}
	
	//$("iframe").remove();

	$("[class]").each(function(){
	  var classArr= this.className.split(" ");
	  for(var i in classArr){
		var name=classArr[i];
		if(name&&test(name)){//判断为广告就移除
			 $(this).remove();
			 console.log("remove class:"+name);
		}
	  }
	})

	$("[id]").each(function(){
		var id= this.id;
		if(id&&test(id)){//判断为广告就移除
			 $(this).remove();
			 console.log("remove id:"+id);
		}
	});
}

function test(val){
	val=$.trim(val);
	if(isAllow(val)){
	  return false;
	}
	if(val=='sina_keyword_ad_area2')
	var arr=["_ad$","^ad_",".*_ad_.*","-ad$","^ad-",".*-ad-.*",'sinaad.*'];
	for(var i in arr){
	  if(new RegExp(arr[i],"i").test(val)){
		return true;
	  }
	}
	return false;
}

function isAllow(val){
	var arr=["sina_keyword_ad_area2"];
	for(var i in arr){
	  if( val==arr[i]){
		return true;
	  }
	}
	return false;
{'fraction_non_alphanumeric': 0.26454223571067276, 'fraction_numerical': 0.006069802731411229, 'mean_word_length': 3.945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3159609', 'n_tokens_mistral': 922, 'n_tokens_neox': 870, 'n_words': 123}