<commit_before>//init widget
var widget = document.getElementById('widget'),
	token = YAHOO.util.Cookie.get("yoisAccessToken"),
	launchPopup = function(event){
			var url = 'test.php?auth';
			window.open(url, 'auth', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=800,height=650,left=450,top=250');
		},
	postComment = function(){
		var href = encodeURIComponent(document.location.href),
			text = widget.getElementsByTagName('textarea')[0].value,
			title = ' left a comment at '+href,
			body = encodeURIComponent(text.substr(0,9)+'...'),//title will be the first 10 char from comment w/ trailing elipses
			url = "test.php?submit",
			params = 'link='+href+'&title='+title+'&body='+body,
			callback = {
				success: function(o){
					if (o.responseText){
						console.log(o.responseText);
					}
				},
				failure: function(o){}
			};
		YAHOO.util.Connect.asyncRequest('POST', url, callback, params);
	},
	html = null;

//build widget html
if(token){
	html+=''
	+'<span>publishing updates to Yahoo!</span>';
}else{
	html+=''
	+'<a href="" onclick="launchPopup()">'
		+'<img src="http://l.yimg.com/a/i/ydn/social/updt-spurp.png" style="border-width:0px;"/>'
	+'</a>';
}
html+=''
	+'<form>'
		+'<textarea></textarea><br/>'
		+'<button onclick="postComment(); return false">Post Comment</button>'
	+'</form>';
widget.innerHTML = html;
widget.style.display = 'block';<commit_msg>minor typo correction<commit_after>//init widget
var widget = document.getElementById('widget'),
	token = YAHOO.util.Cookie.get("yosAccessToken"),
	launchPopup = function(event){
			var url = 'test.php?auth';
			window.open(url, 'auth', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=800,height=650,left=450,top=250');
		},
	postComment = function(){
		var href = encodeURIComponent(document.location.href),
			text = widget.getElementsByTagName('textarea')[0].value,
			title = ' left a comment at '+href,
			body = encodeURIComponent(text.substr(0,9)+'...'),//title will be the first 10 char from comment w/ trailing elipses
			url = "test.php?submit",
			params = 'link='+href+'&title='+title+'&body='+body,
			callback = {
				success: function(o){
					if (o.responseText){
						console.log(o.responseText);
					}
				},
				failure: function(o){}
			};
		YAHOO.util.Connect.asyncRequest('POST', url, callback, params);
	},
	html = null;

//build widget html
if(token){
	html+=''
	+'<span>publishing updates to Yahoo!</span>';
}else{
	html+=''
	+'<a href="" onclick="launchPopup()">'
		+'<img src="http://l.yimg.com/a/i/ydn/social/updt-spurp.png" style="border-width:0px;"/>'
	+'</a>';
}
html+=''
	+'<form>'
		+'<textarea></textarea><br/>'
		+'<button onclick="postComment(); return false">Post Comment</button>'
	+'</form>';
widget.innerHTML = html;
widget.style.display = 'block';
{'fraction_non_alphanumeric': 0.20587194906261055, 'fraction_numerical': 0.016979129819596747, 'mean_word_length': 4.806981519507187, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '6733176', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1023, 'n_words': 181}