first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
(function() {
window.mc4wp = window.mc4wp || {
listeners: [],
forms: {
on: function(evt, cb) {
window.mc4wp.listeners.push(
{
event : evt,
callback: cb
}
);
}
}
}
})();

View File

@@ -0,0 +1,12 @@
function maybePrefixUrlField() {
if (this.value.trim() !== '' && this.value.indexOf('http') !== 0) {
this.value = "http://" + this.value;
}
}
var urlFields = document.querySelectorAll('.mc4wp-form input[type="url"]');
if (urlFields) {
for (var j=0; j < urlFields.length; j++) {
urlFields[j].addEventListener('blur', maybePrefixUrlField);
}
}