diff --git a/example/aframe/sandbox/index.html b/example/aframe/sandbox/index.html
index 6066122..02ee071 100644
--- a/example/aframe/sandbox/index.html
+++ b/example/aframe/sandbox/index.html
@@ -6,11 +6,11 @@
-
+
@@ -28,15 +28,15 @@
+
+
+
+ `
+)
+ //${window.XRFMENU.html.map( (html) => typeof html == "function" ? html() : html ).join('\n')}
window.XRFMENU = {
- logo: './../../assets/logo.png',
+ $: $XRFMENU,
- html: [
+ morelabel: '⚡',
+ enabled: false,
+ logo: './../../assets/logo.png',
+ buttons: [
`🧑🤝🧑 meeting
`,
`🔗 share
`
],
+ init: () => {
+
+ // bind object as alpine app
+ document.body.appendChild( XRFMENU.$ )
+ document.addEventListener('alpine:init', () => Alpine.bind('XRFMENU', () => XRFMENU ) )
+
+ //if( XRFMENU.logo ) $('.logo').style['background-image'] = `url(${XRFMENU.logo})`
+ window.notify = XRFMENU.notify(window)
+ window.share = XRFMENU.share
+ window.download = XRFMENU.download
+ window.notify('loading '+document.location.search.substr(1))
+ // reroute console messages to snackbar notifications
+ console.log = ( (log) => function(str){
+ if( String(str).match(/(:.*#|note:)/) ) window.notify(str)
+ log(str)
+ })(console.log)
+ // allow iframe to open url
+ window.addEventListener('message', (event) => {
+ if (event.data && event.data.url) {
+ window.open(event.data.url, '_blank');
+ }
+ });
+ },
+
loadFile(contentLoaders, multiple){
return () => {
window.notify("if you're on Meta browser, file-uploads might be disabled")
@@ -299,409 +709,3 @@ window.XRFMENU = {
}
}
-window.XRFMENU.addHTML = () => {
-
- let el = document.createElement("div")
- el.innerHTML += `
-
-
-
- `
- document.body.appendChild(el)
-
- if( XRFMENU.logo ) $('.logo').style['background-image'] = `url(${XRFMENU.logo})`
-
- window.notify = XRFMENU.notify(window)
- window.share = XRFMENU.share
- window.download = XRFMENU.download
- window.notify('loading '+document.location.search.substr(1))
- // reroute console messages to snackbar notifications
- console.log = ( (log) => function(str){
- if( String(str).match(/(:.*#|note:)/) ) window.notify(str)
- log(str)
- })(console.log)
- // allow iframe to open url
- window.addEventListener('message', (event) => {
- if (event.data && event.data.url) {
- window.open(event.data.url, '_blank');
- }
- });
-
-}