Hello
I am trying to implement a button (to log out) on the top bar, I used this code (i found it in this forum)
but I don't know what to add, I can't see anything on my top bar
<script id="clockScript1" type="text/javascript">
var param = 'Home';
var theScope = scope;
var clockInterval;
$(function () {
if (clockInterval) return;
// add button
var div3 = $('<div/>');
var button = document.createElement("BUTTON");
var b = document.createTextNode("Déconnexion")
var logo = new Image();
//logo.src='/wieland_logo.jpeg';
//logo.height=45;
//button.appendChild(logo);
//button.height=45;
//button.left=50;
//button.appendChild(b);
button.addEventListener("click", doIT.bind(null, param));
div3.append(button);
//var div5 =$('<div/>');
//var taster = document.createElement("Button");
//var pic = new Image();
//pic.src = "/wieland_logo.jpeg";
//pic.height=45;
//taster.appendChild(pic);
//pic.addEventListener("click", doIT.bind(null,param));
//div5.append(taster);
//add to toolbar when it's available
var addToToolbarTimer;
function addToToolbar() {
var toolbar = $('.md-toolbar-tools');
if(!toolbar.length) return;
//toolbar.append(div5);
toolbar.append(div4);
//toolbar.append(div1);
toolbar.append(div3);
//toolbar.append(div2)
clearInterval(addToToolbarTimer);
}
addToToolbarTimer = setInterval(addToToolbar, 100);
function doIT(m){
theScope.send(m);
}
});
</script>```