This commit is contained in:
√(noham)² 2023-04-22 08:19:00 +02:00
parent c6f11aa0a2
commit 2a69662e18
2 changed files with 30 additions and 5 deletions

View File

@ -13,9 +13,15 @@
<div id="firstbutton"> <div id="firstbutton">
<div class="changeTheme"> <div class="changeTheme">
<img src="assets/img/blackandwhite.png" alt="blackandwhite" style="max-width: 50px; max-height: 50px; margin: 10px;"> <img src="assets/img/blackandwhite.png" alt="blackandwhite"
style="max-width: 50px; max-height: 50px; margin: 10px;">
</div> </div>
<!-- <div class="changeTheme">
<img src="assets/img/blackandwhite.png" alt="blackandwhite"
style="max-width: 50px; max-height: 50px; margin: 10px;" onclick="capture()">
</div> -->
<div> <div>
<label for="code">Entrez le code :</label> <label for="code">Entrez le code :</label>
<input type="text" id="code" name="code" value="9782017102106"> <input type="text" id="code" name="code" value="9782017102106">
@ -320,6 +326,25 @@ sesamth
} }
}) })
</script> </script>
<!-- <script>
function capture() {
const canvas = document.createElement("canvas");
const context = canvas.getContext("2d");
const video = document.createElement("video");
try {
const captureStream = navigator.mediaDevices.getDisplayMedia();
video.srcObject = captureStream;
context.drawImage(video, 0, 0, window.width, window.height);
const frame = canvas.toDataURL("image/png");
captureStream.getTracks().forEach(track => track.stop());
window.location.href = frame;
} catch (err) {
console.error("Error: " + err);
}
};
capture();</script> -->
</body> </body>
</html> </html>

View File

@ -39,7 +39,7 @@ body {
} }
img { img {
width: 100%; width: 50%;
} }
iframe { iframe {