mirror of
https://github.com/Polaris-Entertainment/bytefy.git
synced 2026-04-12 02:50:37 +00:00
Add chrome extension
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user