Sha256: bc6d56edfcaf75d7c6524e7062bd9a516c862d11c356e1b69ba17129d765b91e
Contents?: true
Size: 736 Bytes
Versions: 15
Compression:
Stored size: 736 Bytes
Contents
mumuki.load(function () { var svgs = ['403', '404', '500', 'timeout_1', 'timeout_2', 'timeout_3']; mumuki.errors = mumuki.errors || {}; mumuki.characters = mumuki.characters || {}; svgs.forEach(function (svgErrorSuffix) { addImage(mumuki.errors, 'error_' + svgErrorSuffix, '/'); }); addImage(mumuki.characters, 'yellow_context', '/character/kids/'); function addImage(object, imageName, urlPrefix) { var url = urlPrefix + imageName + '.svg'; if (!object[imageName]) { $.get(url, function (data) { var duration = parseFloat($(data).find('animate').attr('dur') || 0, 10) * 1000; object[imageName] = { url: url, duration: duration }; }); } } });
Version data entries
15 entries across 15 versions & 1 rubygems