Skip to content

Instantly share code, notes, and snippets.

@JugurthaK
Last active March 21, 2018 19:41
Show Gist options
  • Save JugurthaK/4d29a17895aa3ea8cccd4da64c69b141 to your computer and use it in GitHub Desktop.
Save JugurthaK/4d29a17895aa3ea8cccd4da64c69b141 to your computer and use it in GitHub Desktop.
// J'ai dû utilisé la bibliothèque qrcode.js
// Tu la trouveras facilement sur internet, il suffit juste d'ajouter une ligne <script src=qrcode.js> </script>
var button = document.getElementById('button')
button.addEventListener('click', function () {
var id = $.now() - 1489270000000;
var cl = document.getElementById('cl').value;
if (cl === "") {
cl = 50;
}
var qrContenu = "WBCB;SERVICE;1;" + id + ";" + cl;
new QRCode(document.getElementById("qrcodeCanvas40"), qrContenu);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment