Skip to content

Commit

Permalink
Skip slides with alt=skip
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 16, 2024
1 parent 21e5dc7 commit 178cd47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion templates/pages/tools/annotated-presentations.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<div id="controls">
<h1>Annotated presentation creator</h1>
<p>See <a href="https://simonwillison.net/2023/Aug/6/annotated-presentations/">How I make annotated presentations</a> for instructions on using this tool.</p>
<p>Enter "skip" as alt text to skip a slide.</p>
<input type="file" id="imageInput" multiple accept="image/*" />
<button id="loadImagesButton">Load images</button>
<p style="display: none">
Expand Down Expand Up @@ -307,7 +308,11 @@ <h1>Annotated presentation creator</h1>
}
}
});
dataObjects.push(elementData);
if (elementData.alt && elementData.alt.toLowerCase() == 'skip') {
// Skip this slide
} else {
dataObjects.push(elementData);
}
});
return dataObjects;
}
Expand Down

0 comments on commit 178cd47

Please sign in to comment.