Add chrome extension

This commit is contained in:
Myx
2024-11-15 02:42:25 +01:00
parent 8792699c7c
commit 1b58440d4d
19 changed files with 409 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
document.addEventListener('DOMContentLoaded', function() {
const urlParams = new URLSearchParams(window.location.search);
const content = urlParams.get('content');
generateQRCode(content);
});
function generateQRCode(content) {
let qrCodeElement = document.getElementById('qrcode');
qrCodeElement.innerHTML = "";
document.getElementById('content').innerText = content;
new QRCode(qrCodeElement, {
text: content,
width: 256,
height: 256,
correctLevel: QRCode.CorrectLevel.L
});
}