setInterval(()=>{// Wait for the file inputconstinput=document.getElementById("qrFile");if(input&&!input.getAttribute("data-heh")){// Add change handlerinput.setAttribute("data-heh","yup");console.log("Found file input");input.addEventListener("change",()=>{if(input.files&&input.files.length){// Read the imageconstreader=newFileReader();reader.onload=function(){constarray=newUint8Array(this.result);letp=0;// locate tEXt metadata markerwhile((p=array.indexOf(116,p))!==-1){if(array[p+1]===69&&array[p+2]===88&&array[p+3]===116){console.log("tEXt metadata start found at:",p);constsize=newDataView(array.buffer).getUint16(p-2);constparams=newTextDecoder().decode(array.subarray(p+4,size+p+4)).replace("\0",":");console.log(params);constform=input.closest("form");consteditor=form.querySelector("textarea[name=com]");editor.value+=`[code]${params}[/code]`;break;}p++;}}reader.readAsArrayBuffer(input.files[0]);}});}},250);