work in progress [might break]
/ mirror_to_github (push) Successful in 20s Details
/ test (push) Successful in 4s Details

This commit is contained in:
Leon van Kammen 2024-05-10 08:43:01 +00:00
parent 86d1102872
commit 1832cd18fe
1 changed files with 7 additions and 2 deletions

View File

@ -24,8 +24,13 @@ AFRAME.registerComponent('paste', {
.then( (base64) => {
let mimetype = base64.replace(/;base64,.*/,'')
console.log(base64.substr(0,100))
//let base64str = base64.replace(/.*;base64,/,'')
alert(`\nYES!\n\n${mimetype} file received!\n\n(TODO: render it)`)
let data = base64.replace(/.*;base64,/,'')
if( data.match(/<a-/) ){
let el = document.createElement('a-entity')
el.innerHTML = data
AFRAME.scenes[0].appendChild(el)
console.log(data)
}
})
},