Git Stats

by Ebuka Chibueze

HTML

<script>
  
  		
		// Create a new request object
var request = new XMLHttpRequest(); // global var
request.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
      alert("Number of PRs:"+request.responseText.substr(18,3))	
    }
	}



//parseInt(request.responseText.substr(18,3))

  
  
  //-------- Website
    function goToURL() {
		var user = prompt("Please enter username", "Dogi");

  
location.href = 'https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3A'+user+'+is%3Apublic+repo%3Aopen-learning-exchange%2Fopen-learning-exchange.github.io+is%3Amerged+'
    }
	
	function goToURL2() {
		var user = prompt("Please enter username", "Dogi");


 

location.href ='https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3A'+user+'+is%3Apublic+repo%3Aopen-learning-exchange%2Fopen-learning-exchange.github.io'
    }
	
	
	
	
	
	
	//------------------------API
	
	function goToURL3() {
	var user = prompt("Please enter username", "Dogi");
    
 
		
		location.href =  'https://api.github.com/search/issues?q=repo:open-learning-exchange/open-learning-exchange.github.io+author:'+user+'+is:merged&sort=created&order=asc'
		
		
		

    }
	function goToURL4() {
	var user = prompt("Please enter username", "Dogi");
    
     
		location.href =  'https://api.github.com/search/issues?q=repo:open-learning-exchange/open-learning-exchange.github.io+author:'+user+'+type:pr&sort=created&order=asc'
				


    }
	
		function goToURL5() {
	var user = prompt("Please enter username", "Dogi");
    
     
		location.href =  'https://api.github.com/search/issues?q=repo:open-learning-exchange/open-learning-exchange.github.io+author:'+user+'+type:issue&sort=created&order=asc'
				


    }
	
	function Total_PRs(){ //Test-ALL
	var user = prompt("Please enter username", "Dogi");
     
		
		var object= 'github.com';
		object = ...