reformat index

This commit is contained in:
HorizonCode 2023-05-04 21:23:22 +02:00
parent 00e3e80d43
commit b3463378e9

View File

@ -66,7 +66,8 @@
<button class="btn btn-lg btn-launch btn-accent" id="launch-btn">Launch</button>
<div class="patch-checkbox" style="display: none;">
<input type="checkbox" id="enablePatching" disabled />
<label for="enablePatching" style="display: initial;">enable Patching</label>
<label for="enablePatching" style="display: initial;">enable
Patching</label>
</div>
</div>
</div>
@ -115,5 +116,40 @@
</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>