$(function(){
  $(".tablesorter").tablesorter();
  $("tr[data-link]").click(function() {
    window.location = $(this).data("link")
  });
  console.log('Scripts loaded.');
});

@@ -1,10 +1,24 @@
-$(
+var tablesort = 
 function
@@ -19,16 +19,17 @@
 nction()
+ 
 %7B%0A  $(%22.
@@ -63,129 +63,90 @@
 ;%0A  
-$(%22tr%5Bdata-link%5D%22).click(function() %7B%0A    window.location = $(this).data(%22link%22)%0A  %7D);%0A  console.log('Scripts loaded.');%0A%7D
+console.log('Tablesorter loaded.');%0A%7D;%0A%0A$(document).on('turbolinks:load', tablesort
 );%0A

Load js on turbolink refresh