function Prefetch() {
    this.hooks();
}

Prefetch.prototype.hooks = function () {
    var links = document.querySelectorAll('a');

    for (var n = 0; n < links.length; n++) {

        links[n].addEventListener('mousedown', function (event) {
            // Left mouse click
            if (event.which == 1) {
                var prefetch = document.createElement('link');

                prefetch.rel = 'prefetch';
                prefetch.href = this.href;

                document.head.appendChild(prefetch);
            }

        }, false);
    }
};
@@ -122,24 +122,56 @@
 rAll('a');%0A%0A
+    var length = links.length;%0A%0A
     for (var
@@ -182,22 +182,16 @@
  0; n %3C 
-links.
 length; 
@@ -210,46 +210,30 @@
     
-links%5Bn%5D.addEventListener('mousedown',
+var prefetchFunction =
  fun
@@ -279,16 +279,25 @@
 se click
+ or Touch
 %0A       
@@ -305,16 +305,59 @@
     if (
+event.constructor.name === 'TouchEvent' %7C%7C 
 event.wh
@@ -362,16 +362,17 @@
 which ==
+=
  1) %7B%0A  
@@ -601,15 +601,146 @@
    %7D
-, false
+;%0A%0A        %5B'touchstart', 'mousedown'%5D.forEach(value =%3E %7B%0A            links%5Bn%5D.addEventListener(value, prefetchFunction, false);%0A        %7D
 );%0A 

Add touchstart to support touch devices