(($) -> 
  $('html').data("runningAjaxRequests", {});
  
  $.cancelableAjax = (ajax_options) ->
    unique_identifier = Math.floor(Math.random()*10000);
    ajax_request = $.ajax(ajax_options)
    $('html').data("runningAjaxRequests")[unique_identifier] = ajax_request
    return ajax_request
    
  $.cancelAjaxRequests = ->
    request.abort() for identifier, request of $('html').data("runningAjaxRequests")
    $('html').data("runningAjaxRequests", {});
    return $;
  

)(jQuery)

@@ -1,12 +1,18 @@
 (
+function
 ($) 
--%3E 
+%7B
 %0A  $
@@ -53,19 +53,16 @@
 %22, %7B%7D);%0A
-  %0A
   $.canc
@@ -78,37 +78,101 @@
 x = 
+function
 (ajax
-_o
+O
 ptions
-) -%3E%0A    unique_
+, identifier) %7B%0A    var ajaxRequest;%0A    if (identifier == null) %7B%0A      
 iden
@@ -208,17 +208,19 @@
 om()
-*
+ * 
 10000);%0A
     
@@ -219,16 +219,22 @@
 0);%0A
+    %7D%0A
     ajax
 _req
@@ -225,26 +225,25 @@
   %7D%0A    ajax
-_r
+R
 equest = $.a
@@ -254,17 +254,17 @@
 ajax
-_o
+O
 ptions)
+;
 %0A   
@@ -306,15 +306,8 @@
 s%22)%5B
-unique_
 iden
@@ -316,32 +316,32 @@
 fier%5D = ajax
-_r
+R
 equest
+;
 %0A    return 
@@ -348,21 +348,21 @@
 ajax
-_r
+R
 equest
+;
 %0A  
-  
+%7D;
 %0A  $
@@ -387,35 +387,115 @@
 s = 
--%3E%0A    request.abort()
+function() %7B%0A    var identifier, request, _ref;%0A    _ref = $('html').data(%22runningAjaxRequests%22);%0A   
  for 
+(
 iden
@@ -504,106 +504,334 @@
 fier
-, request of $('html').data(%22runningAjaxRequests%22)%0A    $('html').data(%22runningAjaxRequests%22, %7B%7D
+ in _ref) %7B%0A      request = _ref%5Bidentifier%5D;%0A      request.abort();%0A    %7D%0A    $('html').data(%22runningAjaxRequests%22, %7B%7D);%0A    return $;%0A  %7D;%0A  $.cancelAjaxRequest = function(identifier) %7B%0A    var request;%0A    request = $('html').data(%22runningAjaxRequests%22)%5Bidentifier%5D;%0A    if (request != null) %7B%0A      request.abort(
 );%0A
+    %7D%0A
     
@@ -846,10 +846,12 @@
 ;%0A  
-%0A%0A
+%7D;%0A%7D
 )(jQ
@@ -855,9 +855,10 @@
 (jQuery)
+;
 %0A

Convert to js