let uiContainer = {
id: 'welcome-btn-ui',
domElement: undefined,
imgElement: undefined,
}
function start(){
unloadHTMLUI = loadHTMLUI();
}
function stop() {
uiContainer.domElement && uiContainer.domElement.remove()
uiContainer = {};
}
function loadHTMLUI() {
const container = document.createElement('div');
container.id = uiContainer.id;
uiContainer.domElement = container;
Object.assign(container.style, {
postion: 'absolute',
position: 'absolute',
display: 'flex',
'align-items': 'center',
'justify-content': 'center',
bottom:'5vh',
width:'100%',
zIndex: 1,
})
const a = document.createElement('a')
// put the link that will open when the user taps on a button below //
a.href='https://mywebar.com/';
a.target='_blank';
const img = document.createElement('img');
uiContainer.imgElement = img;
Object.assign(img.style, {
'max-width': '48vw',
height: 'auto'
})
// put the image you want to use as a button below //
img.src = 'https://mywebar-a.akamaihd.net/1150/130384/btn.png';
a.appendChild(img);
container.appendChild(a);
document.body.appendChild(container);
const unloadHTMLUI = () => {
document.body.removeChild(container)
}
return unloadHTMLUI
}
function update( event ) {}