reformat index

This commit is contained in:
HorizonCode 2023-05-04 21:28:04 +02:00
parent b3463378e9
commit 92ee92d636
1 changed files with 1 additions and 35 deletions

View File

@ -115,41 +115,7 @@
</div>
</main>
</body>
<script type="text/javascript" src="../assets/mdb.min.js"></script>
<script>
function createElement(type, callback) {
var element = document.createElement(type);
callback(element);
return element;
}
function freezeGif(img) {
var width = img.width,
height = img.height,
canvas = createElement('canvas', function (clone) {
clone.width = width;
clone.height = height;
}),
attr,
i = 0;
var freeze = function () {
canvas.getContext('2d').drawImage(img, 0, 0, width, height);
for (i = 0; i < img.attributes.length; i++) {
attr = img.attributes[i];
if (attr.name !== '"') {
canvas.setAttribute(attr.name, attr.value);
}
}
canvas.style.position = 'absolute';
img.parentNode.insertBefore(canvas, img);
img.style.opacity = 0;
};
}
</script>
</html>