| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 | <!DOCTYPE html><html>  <head>    <title>Instascan</title>    <script type="text/javascript" src="https://rawgit.com/schmich/instascan-builds/master/instascan.min.js"></script>  </head>  <body>	<h1>Scanner QrCODE</h1>    <video id="preview"></video>    <script type="text/javascript">	    //Recupération du cookie espace		function getCookieVal(offset) {			let endstr = document.cookie.indexOf (";", offset);			if (endstr==-1)				endstr = document.cookie.length;			return unescape(document.cookie.substring(offset, endstr));		}			function getCookie (name) {			let arg = name + "=";			let alen = arg.length;			let clen = document.cookie.length;			let i = 0;			while (i < clen) {				let j = i+alen;				if (document.cookie.substring(i, j) == arg)					return getCookieVal(j);				i = document.cookie.indexOf(" ",i)+1;				if (i == 0)					break;			}			return null;		}		    	//let espace = getCookie("microfolies.lens.espace");    	let espace = getCookie("JSESSIONID");    	console.log(espace);    	  		//Scanner QRcode		let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });		scanner.addListener('scan', function (content) {			espace ? console.log(content + "/" + espace) : console.log(content);		});		Instascan.Camera.getCameras().then(function (cameras) {			if (cameras.length > 0) {		    	scanner.start(cameras[0]);		    }			else {		    console.error('No cameras found.');		    }		}).catch(function (e) {		    console.error(e);		});    </script>  </body></html>
 |