comment out dead code and prepare function for moving to right index

This commit is contained in:
Chris Cochrun 2023-09-29 16:34:10 -05:00
parent affaf7a53b
commit ed9693c27b
2 changed files with 30 additions and 22 deletions

View file

@ -409,26 +409,26 @@ Item {
}
}
function addHtml(url) {
console.log("adding an html");
var pageCount = 1;
web.runJavaScript("Reveal.getSlides()", function(result) {
let str = '';
for (const [p, val] of Object.entries(result[0])) {
str += `${p}::${val}\n`;
}
console.log(str);
pageCount = result.length;
console.log(pageCount);
presProxyModel.presentationModel.newItem(url, pageCount);
selectedLibrary = "presentation";
presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count();
console.log(presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex));
const presentation = presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex);
showPassiveNotification("newest image: " + presentation.title);
if (!editMode)
editMode = true;
editSwitch("presentation", presentation);
});
}
/* function addHtml(url) { */
/* console.log("adding an html"); */
/* var pageCount = 1; */
/* web.runJavaScript("Reveal.getSlides()", function(result) { */
/* let str = ''; */
/* for (const [p, val] of Object.entries(result[0])) { */
/* str += `${p}::${val}\n`; */
/* } */
/* console.log(str); */
/* pageCount = result.length; */
/* console.log(pageCount); */
/* presProxyModel.presentationModel.newItem(url, pageCount); */
/* selectedLibrary = "presentation"; */
/* presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count(); */
/* console.log(presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex)); */
/* const presentation = presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex); */
/* showPassiveNotification("newest image: " + presentation.title); */
/* if (!editMode) */
/* editMode = true; */
/* editSwitch("presentation", presentation); */
/* }); */
/* } */
}

View file

@ -181,6 +181,14 @@ Item {
if (loadRequest.status == 2)
showPassiveNotification("yahoo?");
}
/* function moveToSlideIndex(index) { */
/* web.runJavaScript(" */
/* const index */
/* for (let i = 0; i < index; i++) { */
/* Reveal.next(); */
/* }") */
/* } */
}
}