<commit_before>
var countdown=30;
var count;
var gather;

 function GetMousePos(e){ 
   if(!e){ var e=window.event; } 
   var s=e.clientX +  '-' + window.event.clientY ;

   document.getElementById("content").innerHTML +=s +','; 
   
} 



function gatherEntropy(){
  
  
 count = setInterval("Credtimer", 1000); 
 gather = setInterval("GetMousePos",10);
  
}



function Credtimer()
{
  countdown=countdown-1;
  
  if (countdown <= 0)
  {
     clearInterval(count);
     clearInterval(gather);
  }
  
  
  
  
  
  
}<commit_msg>Improving JS Entropy Library<commit_after>


var whereAt= (function(){
    if(window.pageXOffset!= undefined){
        return function(ev){
            return [ev.clientX+window.pageXOffset,
            ev.clientY+window.pageYOffset];
        }
    }
    else return function(){
        var ev= window.event,
        d= document.documentElement, b= document.body;
        return [ev.clientX+d.scrollLeft+ b.scrollLeft,
        ev.clientY+d.scrollTop+ b.scrollTop];
    }
})()



/*
 * 
 * Usage: 
 * 
 * var count=100;
 * document.getElementById('ClickDiv').onclick=function(e){document.getElementById('content').innerHTML += whereAt(e); 
 * count=count-1; 
 * document.getElementById('countsremaining').innerHTML = count};
 * 
 * 
 * 
 * 
 * 
 */
{'fraction_non_alphanumeric': 0.14956930305403288, 'fraction_numerical': 0.01096319498825372, 'mean_word_length': 2.8963414634146343, 'pattern_counts': {'":': 0, '<': 4, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1263116', 'n_tokens_mistral': 451, 'n_tokens_neox': 415, 'n_words': 69}