From 35bc366f104c8dd2767c9d3a2c6041cb4d740543 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Sun, 28 May 2023 14:39:51 +0200 Subject: [PATCH] slideshow script --- ea-scripts/Slideshow.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ea-scripts/Slideshow.md b/ea-scripts/Slideshow.md index 8d9f8df..aa2548b 100644 --- a/ea-scripts/Slideshow.md +++ b/ea-scripts/Slideshow.md @@ -11,7 +11,8 @@ if(!ea.verifyMinimumPluginVersion || !ea.verifyMinimumPluginVersion("1.8.17")) { } const statusBar = document.querySelector("div.status-bar"); -const altKey = ea.targetView.modifierKeyDown.altKey; +const ctrlKey = ea.targetView.modifierKeyDown.ctrlKey || ea.targetView.modifierKeyDown.metaKey; +const altKey = ea.targetView.modifierKeyDown.altKey || ctrlKey; //constants const STEPCOUNT = 100; @@ -499,6 +500,15 @@ if(window.ExcalidrawSlideshow && (window.ExcalidrawSlideshow.script === utils.sc await start(); presentationSettings(); } else { + if(window.ExcalidrawSlideshowStartTimer) { + clearTimeout(window.ExcalidrawSlideshowStartTimer); + delete window.ExcalidrawSlideshowStartTimer; + } + if(ctrlKey) { + await start(); + presentationSettings(); + return; + } window.ExcalidrawSlideshow = { script: utils.scriptFile.path, timestamp