Created
March 22, 2024 16:56
-
-
Save Awashcard0/16fac68c23d674d62a57e41328732722 to your computer and use it in GitHub Desktop.
End all slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doc = SlidesApp.openByUrl("https://docs.google.com/presentation/d/1vgxlzg4dC-GhneJcSwDH8W489G_6hjCtSoE9CT79IOQ/edit"); | |
function onOpen() { | |
var ui = SlidesApp.getUi(); | |
ui.createMenu('Funnie Maker') | |
.addItem('Do a funnie (Or dont????)', 'funnie') | |
.addToUi(); | |
} | |
function funnie() { | |
var ui = SlidesApp.getUi(); | |
var result = ui.alert( | |
'Please confirm', | |
'Are you sure you want to continue?', | |
ui.ButtonSet.YES_NO); | |
if (result == ui.Button.YES) { | |
var presentation = doc; | |
var slides = presentation.getSlides(); | |
for (var i = slides.length - 1; i >= 0; i--) { | |
var slide = slides[i]; | |
slide.remove(); | |
} | |
} | |
} | |
function doTheFunnie() { | |
funnie(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment