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,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>QR Code</title>
|
||||
<script src="../../libraries/qrcode.min.js"></script>
|
||||
<link rel="stylesheet" href="../page_styling.css">
|
||||
</head>
|
||||
<body>
|
||||
<a href="https://bytefy.net">
|
||||
<img class="logotype" src="https://bytefy.net/assets/logo-full-orange-beta-vectorized.svg" alt="QR Code">
|
||||
</a>
|
||||
<div class="wrapper">
|
||||
<div id="qrcode"></div>
|
||||
|
||||
<div id="content">
|
||||
</div>
|
||||
</div>
|
||||
<script src="qr.js"></script>
|
||||
</body>
|
||||
|
||||
<footer>
|
||||
<p>This extension is created by bytefy. For more online tools visit <a href="https://bytefy.net">bytefy.net</a></p>
|
||||
</footer>
|
||||
</html>
|
||||
@@ -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