function hold_button(elem, seconds, only_once, url) {
  var t;

  var exe = function() {
    if(only_once) {
      elem.mousedown = function () { return false; }
      elem.setAttribute("disabled", "disabled");
    }
    // set URL here to avoid non-javascript browsers from submitting
    // the button too easily
    elem.form.setAttribute("action", url);
    elem.form.submit();
  }

  elem.removeAttribute("disabled");

  elem.onclick = function (event) { event.preventDefault(); }

  elem.onmousedown = function() {
    if(t) clearTimeout(t);
    t = setTimeout(exe, seconds*1000);
  }

  var clear = function () { clearTimeout(t); }
  elem.onmouseup = clear;
  elem.onmouseout = clear;
}

// auto linkify elements with class "hold"
$(document).ready(function() {
  $(".hold").each(function(ind, elem) {
    if(!$(elem).data("url"))
      return;

    var t;
    elem.onclick = function (event) { event.preventDefault(); }
    var exe = function() {
      window.location = $(elem).data("url");
    }
    elem.onmousedown = function() {
      if(t) clearTimeout(t);
      t = setTimeout(exe, 1000);
    }
    var clear = function () { clearTimeout(t); }
    elem.onmouseup = clear;
    elem.onmouseout = clear;
  });
});

@@ -78,24 +78,63 @@
 unction() %7B%0A
+    if(!confirm(%22Continue?%22)) return;%0A%0A
     if(only_
@@ -137,24 +137,24 @@
 nly_once) %7B%0A
-
       elem.m
@@ -531,32 +531,52 @@
 em.onmousedown =
+ elem.ontouchstart =
  function() %7B%0A  
@@ -744,16 +744,43 @@
  clear;%0A
+  elem.ontouchend = clear;%0A
 %7D%0A%0A// au
@@ -848,16 +848,17 @@
 ion() %7B%0A
+%0A
   $(%22.ho
@@ -1031,24 +1031,64 @@
 unction() %7B%0A
+      if(!confirm(%22Continue?%22)) return;%0A
       window
@@ -1140,32 +1140,50 @@
 em.onmousedown =
+ elem.touchstart =
  function() %7B%0A  
@@ -1325,16 +1325,16 @@
  clear;%0A
-
     elem
@@ -1354,16 +1354,45 @@
  clear;%0A
+    elem.ontouchend = clear;%0A
   %7D);%0A%7D)

add long press support for mobile; also ask for confirmation before continuing