(function() {

  this.AriadneJS = function() {

    var defaults = {
      live:  false,
      delay: 600
    }

    this.options = extendDefaults(defaults, arguments[0]);

  }

  // Public Methods
  AriadneJS.prototype.init = function() {

    document.onmousemove = handleMouseMove;
    var eventDoc, doc, body, pageX, pageY;

    function handleMouseMove(event) {

      event = event || window.event; // IE

      // Calculate pageX/Y if missing and clientX/Y available
      if (event.pageX == null && event.clientX != null) {
        eventDoc = (event.target && event.target.ownerDocument) || document;
        doc      = eventDoc.documentElement;
        body     = eventDoc.body;

        event.pageX = event.clientX +
          (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
          (doc && doc.clientLeft || body && body.clientLeft || 0);
        event.pageY = event.clientY +
          (doc && doc.scrollTop  || body && body.scrollTop  || 0) -
          (doc && doc.clientTop  || body && body.clientTop  || 0 );
      }
      pageX = event.pageX
      pageY = event.pageY

    }

    document.onmousedown = handleMouseDown;

    function handleMouseDown(event) {
      console.log({e: event.toElement, X: event.x, Y: event.y});
    }

    window.onbeforeunload = handleBeforeUnload;

    var logger = setInterval(function() { console.log({cX: document.documentElement.clientWidth, cY: document.documentElement.clientHeight, X: pageX, Y: pageY}) }, this.options.delay);

    function handleBeforeUnload(event) { clearInterval(logger); }
  }

  // Private Methods
  function extendDefaults(source, properties) {

    var property;

    for (property in properties) {
      if (properties.hasOwnProperty(property)) {
        source[property] = properties[property];
      }
    }

    return source;

  }

  log = new AriadneJS();
  log.init();

}());
@@ -1,20 +1,46 @@
+var AriadnesThread = %5B%5D;%0A%0A
 (function() %7B%0A%0A  thi
@@ -92,28 +92,8 @@
 = %7B%0A
-      live:  false,%0A
     
@@ -181,28 +181,8 @@
  %7D%0A%0A
-  // Public Methods%0A
   Ar
@@ -228,89 +228,211 @@
     
-document.onmousemove = handleMouseMove;%0A    var eventDoc, doc, body, pageX, pageY
+var eventDoc, doc, body, pageX, pageY;%0A    var cX = document.documentElement.clientWidth;%0A    var cY = document.documentElement.clientHeight;%0A%0A    // Mouse move%0A    document.onmousemove = handleMouseMove
 ;%0A%0A 
@@ -1141,24 +1141,25 @@
  );%0A      %7D%0A
+%0A
       pageX 
@@ -1202,24 +1202,43 @@
 geY%0A%0A    %7D%0A%0A
+    // Mouse click%0A
     document
@@ -1318,63 +1318,75 @@
     
-console.log(%7Be: event.toElement, X: event.x, Y:
+AriadnesThread.push(event.toElement + ':' + event.x + ':' +
  event.y
 %7D);%0A
@@ -1385,66 +1385,88 @@
 nt.y
-%7D
 );%0A    
-%7D%0A%0A    window.onbeforeunload = handleBeforeUnload;
+  // _logger( '/api/ariadnes_threads', %7B thread: AriadnesThread %7D);%0A    %7D
 %0A%0A  
@@ -1471,22 +1471,17 @@
     var 
-logger
+i
  = setIn
@@ -1503,127 +1503,73 @@
 () %7B
- console.log(%7BcX: document.documentElement.clientWidth, cY: document.documentElement.clientHeight, X:
+%0A      AriadnesThread.push(serializer(cX, cY,
  pageX,
- Y:
  pageY
-%7D
 )
+);%0A   
  %7D, 
@@ -1590,16 +1590,86 @@
 elay);%0A%0A
+    // Window status%0A    window.onbeforeunload = handleBeforeUnload;%0A%0A
     func
@@ -1715,22 +1715,17 @@
 nterval(
-logger
+i
 ); %7D%0A  %7D
@@ -1730,29 +1730,8 @@
  %7D%0A%0A
-  // Private Methods%0A
   fu
@@ -1967,16 +1967,342 @@
 ;%0A%0A  %7D%0A%0A
+  function serializer(cX, cY, X, Y) %7B%0A    return (cX + ':' + cY + ':' + X + ':' + Y);%0A  %7D%0A%0A  function _logger(url, params) %7B%0A    $.ajax(%7B%0A      url: url,%0A      type: 'POST',%0A      dataType: 'script',%0A      data: params,%0A      error: function(jqXHR, testStatus, errorThrown) %7B %7D,%0A      success: function(data) %7B %7D%0A    %7D);%0A  %7D%0A%0A
   log = 
@@ -2318,16 +2318,17 @@
 neJS();%0A
+%0A
   log.in

Remove console's log