Last active
July 13, 2016 11:11
-
-
Save remcotolsma/4aea58878e951f56a7a83028ca7cb3e6 to your computer and use it in GitHub Desktop.
Holiday Media JavaScript API from https://lib.hmcms.nl/js/2/ha/booking/hmapi.js unminified with http://unminify.com/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.hmapi || (window.hmapi = function(n) { | |
"use strict"; | |
var i, e = n.document, | |
o = function(n, i, o, t) { | |
o = e.createElement("script"), o.src = n, o.onload = i, o.onreadystatechange = function(n) { | |
n = this.readyState, ("complete" == n || "loaded" == n) && i() | |
}, t = e.getElementsByTagName("script")[0], t.parentNode.insertBefore(o, t) | |
}, | |
t = function() { | |
var t, r = "https://lib.hmcms.nl/js/2/", | |
a = [], | |
d = function() { | |
for (t = 2; a.length;) a.shift()() | |
}, | |
u = function() { | |
i.hm && i.hm.libloader ? d() : o(r + "libloader.js?load=ha.booking.widget", d) | |
}; | |
return function(d) { | |
if (2 == t ? d() : a.push(d), !t) { | |
var c = n.jQuery ? n.jQuery.fn.jquery.split(".") : []; | |
if (t = 1, c[0] > 1 || c[1] > 7) i = jQuery, u(); | |
else { | |
var f = e.createElement("i"); | |
f.innerHTML = "<!--[if lt IE 9]>1<![endif]-->", o(r + ("1" === f.innerHTML ? "jquery-1.11.2.js" : "jquery-2.1.3.js"), function() { | |
i = n.jQuery.noConflict(!1), u() | |
}) | |
} | |
} | |
} | |
}(); | |
return { | |
load: function() { | |
var n = arguments; | |
t(function() { | |
i.hm.libloader.add.apply(i.hm.libloader, n) | |
}) | |
}, | |
ready: function(n) { | |
t(function() { | |
i(e).ready(n) | |
}) | |
} | |
} | |
}(window)), window.hmapi.booking || (window.hmapi.booking = function() { | |
return { | |
init: function(n) { | |
hmapi.ready(function(i) { | |
i.hm.libloader.add("ha.booking.widget").done(function() { | |
var e = i(".booking-widget"); | |
e.booking(), "function" == typeof n && n.apply(e) | |
}) | |
}) | |
} | |
} | |
}(window)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment