/* Add http:// to URL fields on blur or when enter is pressed.
 * From https://aaronparecki.com/2018/06/03/4/url-form-field
 * Thanks Aaron!
 */
document.addEventListener('DOMContentLoaded', function() {
  function addDefaultScheme(target) {
    val = target.value.trim()
    if(val.match(/^(?!https?:)[^@]+\.[^@]+$/)) {
      scheme = target.attributes.scheme;
      target.value = (scheme ? scheme.value : "http") + "://" + val;
    }
  }
  var elements = document.querySelectorAll("input[type=url]");
  Array.prototype.forEach.call(elements, function(el, i){
    el.addEventListener("blur", function(e){
      addDefaultScheme(e.target);
    });
    el.addEventListener("keydown", function(e){
      if(e.keyCode == 13) {
        addDefaultScheme(e.target);
      }
    });
  });
});

@@ -134,16 +134,230 @@
  Aaron!%0A
+ *%0A * Warning: this script must be loaded synchronously, ie *not* with %3Cscript%0A * async%3E. It adds an event listener on DOMContentLoaded, which some browsers%0A * (eg Chrome) may fire before async scripts are loaded.%0A
  */%0Adocu

add comment that it shouldn't be loaded async