Ajout du auto hiding de la toolbar
This commit is contained in:
2 files changed
+39
No files matched your search
@@ -100,6 +100,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#editbar {
|
||||||
|
transition: linear 1s opacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
#editbar[hidden]{
|
||||||
|
opacity: 0 !important;
|
||||||
|
transition: unset;
|
||||||
|
}
|
||||||
|
|
||||||
.toolbar ul li {
|
.toolbar ul li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
const TOOLBAR = document.getElementById("editbar")
|
||||||
|
|
||||||
|
if(TOOLBAR){
|
||||||
|
TOOLBAR.hidden = true
|
||||||
|
|
||||||
|
function init(){
|
||||||
|
const DOC = document.querySelector(`iframe[name="ace_outer"]`)?.contentDocument
|
||||||
|
.querySelector(`iframe[name="ace_inner"]`)?.contentDocument
|
||||||
|
?.getElementById("innerdocbody");
|
||||||
|
|
||||||
|
if(!DOC){
|
||||||
|
return setTimeout(init, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Initialized toolbar hiding")
|
||||||
|
|
||||||
|
DOC.addEventListener("input", () => {
|
||||||
|
TOOLBAR.hidden = false
|
||||||
|
})
|
||||||
|
|
||||||
|
TOOLBAR.addEventListener("pointerenter", () => {
|
||||||
|
TOOLBAR.hidden = false
|
||||||
|
})
|
||||||
|
|
||||||
|
TOOLBAR.addEventListener("focusin", () => {
|
||||||
|
TOOLBAR.hidden = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
init()
|
||||||
|
}
|
||||||
Reference in new issue
Block a user