mirror of
https://github.com/michivonah/click-guide.git
synced 2025-12-22 22:16:28 +01:00
remove all existing steps before file import
This commit is contained in:
parent
e95f5aff56
commit
5efe19df58
1 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ printBtn.addEventListener('click', function(){
|
||||||
const importBtn = document.getElementById("importBtn");
|
const importBtn = document.getElementById("importBtn");
|
||||||
const fileInput = document.getElementById("file-import-input");
|
const fileInput = document.getElementById("file-import-input");
|
||||||
importBtn.addEventListener('click', function(){
|
importBtn.addEventListener('click', function(){
|
||||||
|
removeAllSteps();
|
||||||
fileInput.click();
|
fileInput.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -161,6 +162,13 @@ function createStepElement(label, description, imgSrc, triggerAction, triggerEle
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeAllSteps(){
|
||||||
|
const steps = document.querySelectorAll(".step");
|
||||||
|
for (const step of steps){
|
||||||
|
step.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// export guide
|
// export guide
|
||||||
function exportGuide(){
|
function exportGuide(){
|
||||||
// get metadata
|
// get metadata
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue