diff --git a/src/main.js b/src/main.js index 3de287d..6c373b4 100644 --- a/src/main.js +++ b/src/main.js @@ -177,67 +177,67 @@ function menuAlignToHorizontalCenter() { alignSelectOrAllElements(POSITION_X.CEN function menuInspectShapeColor() { inspectShapeColor(); } -function menuSetTransparency0() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0 ); }); } -function menuSetTransparency10() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.1 ); }); } -function menuSetTransparency25() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.25); }); } -function menuSetTransparency33() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.33); }); } -function menuSetTransparency50() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.5 ); }); } -function menuSetTransparency66() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.66); }); } -function menuSetTransparency75() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.75); }); } -function menuSetTransparency90() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 0.9 ); }); } -function menuSetTransparency100() { withSelectedOrAllShapes(function(s) { setAlphaToShape(s, 1 ); }); } - -function menuSetColorSwap() { withSelectedOrAllShapes(function(s) { swapColorsOnShape(s); }); } -function menuSetColorInverse() { withSelectedOrAllShapes(function(s) { invertColorsOnShape(s); }); } -function menuSetColorMaxContrast() { withSelectedOrAllShapes(function(s) { setMaxContrastToTextOnShape(s); }); } - -function menuSetColorSaturationMinus33() { withSelectedOrAllShapes(function(s) { changeHSL(s, -0.33, false, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationMinus10() { withSelectedOrAllShapes(function(s) { changeHSL(s, -0.1, false, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationMinus5() { withSelectedOrAllShapes(function(s) { changeHSL(s, -0.05, false, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationPlus5() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.05, false, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationPlus10() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.1, false, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationPlus33() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.33, false, HSL_COMPONENT.SATURATION); }); } - -function menuSetColorSaturationAbs10() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.10, true, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationAbs25() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.25, true, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationAbs33() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.33, true, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationAbs50() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.5, true, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationAbs66() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.66, true, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationAbs75() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.75, true, HSL_COMPONENT.SATURATION); }); } -function menuSetColorSaturationAbs90() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.9, true, HSL_COMPONENT.SATURATION); }); } - -function menuSetColorLuminosityMinus33() { withSelectedOrAllShapes(function(s) { changeHSL(s, -0.33, false, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityMinus10() { withSelectedOrAllShapes(function(s) { changeHSL(s, -0.1, false, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityMinus5() { withSelectedOrAllShapes(function(s) { changeHSL(s, -0.05, false, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityPlus5() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.05, false, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityPlus10() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.1, false, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityPlus33() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.33, false, HSL_COMPONENT.LUMINOSITY); }); } - -function menuSetColorLuminosityAbs10() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.10, true, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityAbs25() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.25, true, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityAbs33() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.33, true, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityAbs50() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.5, true, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityAbs66() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.66, true, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityAbs75() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.75, true, HSL_COMPONENT.LUMINOSITY); }); } -function menuSetColorLuminosityAbs90() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0.9, true, HSL_COMPONENT.LUMINOSITY); }); } - -function menuSetColorHueMinus30() { withSelectedOrAllShapes(function(s) { changeHSL(s, -30/360, false, HSL_COMPONENT.HUE); }); } -function menuSetColorHueMinus15() { withSelectedOrAllShapes(function(s) { changeHSL(s, -15/360, false, HSL_COMPONENT.HUE); }); } -function menuSetColorHuePlus15() { withSelectedOrAllShapes(function(s) { changeHSL(s, 15/360, false, HSL_COMPONENT.HUE); }); } -function menuSetColorHuePlus30() { withSelectedOrAllShapes(function(s) { changeHSL(s, 30/360, false, HSL_COMPONENT.HUE); }); } - -function menuSetColorHue0() { withSelectedOrAllShapes(function(s) { changeHSL(s, 0/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue30() { withSelectedOrAllShapes(function(s) { changeHSL(s, 30/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue60() { withSelectedOrAllShapes(function(s) { changeHSL(s, 60/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue90() { withSelectedOrAllShapes(function(s) { changeHSL(s, 90/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue120() { withSelectedOrAllShapes(function(s) { changeHSL(s, 120/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue150() { withSelectedOrAllShapes(function(s) { changeHSL(s, 150/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue180() { withSelectedOrAllShapes(function(s) { changeHSL(s, 180/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue210() { withSelectedOrAllShapes(function(s) { changeHSL(s, 210/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue240() { withSelectedOrAllShapes(function(s) { changeHSL(s, 240/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue270() { withSelectedOrAllShapes(function(s) { changeHSL(s, 270/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue300() { withSelectedOrAllShapes(function(s) { changeHSL(s, 300/360, true, HSL_COMPONENT.HUE); }); } -function menuSetColorHue330() { withSelectedOrAllShapes(function(s) { changeHSL(s, 330/360, true, HSL_COMPONENT.HUE); }); } +function menuSetTransparency0() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0 ); }); } +function menuSetTransparency10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.1 ); }); } +function menuSetTransparency25() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.25); }); } +function menuSetTransparency33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.33); }); } +function menuSetTransparency50() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.5 ); }); } +function menuSetTransparency66() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.66); }); } +function menuSetTransparency75() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.75); }); } +function menuSetTransparency90() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 0.9 ); }); } +function menuSetTransparency100() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setAlphaToShape(s, 1 ); }); } + +function menuSetColorSwap() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { swapColorsOnShape(s); }); } +function menuSetColorInverse() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { invertColorsOnShape(s); }); } +function menuSetColorMaxContrast() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { setMaxContrastToTextOnShape(s); }); } + +function menuSetColorSaturationMinus33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -0.33, false, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationMinus10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -0.1, false, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationMinus5() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -0.05, false, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationPlus5() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.05, false, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationPlus10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.1, false, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationPlus33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.33, false, HSL_COMPONENT.SATURATION); }); } + +function menuSetColorSaturationAbs10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.10, true, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationAbs25() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.25, true, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationAbs33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.33, true, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationAbs50() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.5, true, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationAbs66() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.66, true, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationAbs75() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.75, true, HSL_COMPONENT.SATURATION); }); } +function menuSetColorSaturationAbs90() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.9, true, HSL_COMPONENT.SATURATION); }); } + +function menuSetColorLuminosityMinus33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -0.33, false, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityMinus10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -0.1, false, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityMinus5() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -0.05, false, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityPlus5() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.05, false, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityPlus10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.1, false, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityPlus33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.33, false, HSL_COMPONENT.LUMINOSITY); }); } + +function menuSetColorLuminosityAbs10() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.10, true, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityAbs25() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.25, true, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityAbs33() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.33, true, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityAbs50() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.5, true, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityAbs66() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.66, true, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityAbs75() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.75, true, HSL_COMPONENT.LUMINOSITY); }); } +function menuSetColorLuminosityAbs90() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0.9, true, HSL_COMPONENT.LUMINOSITY); }); } + +function menuSetColorHueMinus30() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -30/360, false, HSL_COMPONENT.HUE); }); } +function menuSetColorHueMinus15() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, -15/360, false, HSL_COMPONENT.HUE); }); } +function menuSetColorHuePlus15() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 15/360, false, HSL_COMPONENT.HUE); }); } +function menuSetColorHuePlus30() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 30/360, false, HSL_COMPONENT.HUE); }); } + +function menuSetColorHue0() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 0/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue30() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 30/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue60() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 60/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue90() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 90/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue120() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 120/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue150() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 150/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue180() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 180/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue210() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 210/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue240() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 240/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue270() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 270/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue300() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 300/360, true, HSL_COMPONENT.HUE); }); } +function menuSetColorHue330() { withSelectedOrAllShapesOrGroupsRecursively(function(s) { changeHSL(s, 330/360, true, HSL_COMPONENT.HUE); }); } function menuCenterOnPage() { withSelectedOrAllElements(function(e) { alignShape(fakePageAsReferenceElement(), e, POSITION_X.CENTER, POSITION_Y.CENTER, false); }); } diff --git a/src/selection.js b/src/selection.js index 1cbfe1f..20ea222 100644 --- a/src/selection.js +++ b/src/selection.js @@ -19,6 +19,43 @@ function withSelectedOrAllShapes(doStuff) { .filter (function(e) { return e.getPageElementType() == SlidesApp.PageElementType.SHAPE; }) .forEach(function(e) { doStuff(e.asShape()); }); } + +function withSelectedOrAllShapesOrGroupsRecursively(doStuff) { + var selectedOrAllElementsOnPage = getSelectedElementsOnPage(true); + + withShapesOrGroupsRecursively(selectedOrAllElementsOnPage, doStuff); +} + +function withShapesOrGroupsRecursively(pageElementArray, doStuff) { + var groupsArray = pageElementArray + .filter (function(e) { return e.getPageElementType() == SlidesApp.PageElementType.GROUP; }); + + var elementsArray = pageElementArray + .filter (function(e) { return e.getPageElementType() == SlidesApp.PageElementType.SHAPE; }); + + // This cannot be achieved programmatically (hence, cannot be tested), but in + // the UI is possible to select multiple elemments inside the group. In + // that case, the selection array contains the individual elements *and* + // the parent group, so to only apply the change (doStuff) to the selected + // elements intead of the entire group, we need to skip the group + // processing. The condition below describes only one group selected and + // the any of the elments belong to it. + var shouldSkipGroup = groupsArray.length == 1 + && elementsArray.length > 0 + && elementsArray[0].getParentGroup() != null + && elementsArray[0].getParentGroup().getObjectId() == groupsArray[0].getObjectId(); + + // Handle shapes + elementsArray + .forEach(function(e) { doStuff(e.asShape()); }); + + if (shouldSkipGroup) return; + + // Handle groups, recursively + groupsArray + .forEach(function(e) { withShapesOrGroupsRecursively(e.asGroup().getChildren(), doStuff) }); +} + function withSelectedElements(doStuff) { getSelectedElementsOnPage(false) .forEach(function (e) { doStuff(e); }); @@ -28,8 +65,8 @@ function withSelectedOrAllElements(doStuff) { .forEach(function (e) { doStuff(e); }); } -// Get all selected elements on page as an array. If no elements are selected, get all elements on page. -// If text is selected, get the parent element. +// Get all selected elements on page as an array. If no elements are selected, +// get all elements on page. If text is selected, get the parent element. function getSelectedElementsOnPage(shouldFallbackToGetAllElementsOnPage) { var selection = SlidesApp.getActivePresentation().getSelection(); diff --git a/src/tests/tests.js b/src/tests/tests.js index bacd6f0..6ad8b96 100644 --- a/src/tests/tests.js +++ b/src/tests/tests.js @@ -312,5 +312,61 @@ function gastTestRunner() { testSlide.remove(); }); + test('from ISSUE #10: color commands not working on element groups', function(t) { + var testSlide = slidesDocument.appendSlide(); + var testShape1 = testSlide.insertShape(SlidesApp.ShapeType.RECTANGLE, U1 * 0, U1 * 0, U1, U1); // create test shape + var testShape2 = testSlide.insertShape(SlidesApp.ShapeType.RECTANGLE, U1 * 1, U1 * 1, U1, U1); // create test shape + var testShape3 = testSlide.insertShape(SlidesApp.ShapeType.RECTANGLE, U1 * 2, U1 * 2, U1, U1); // create test shape + var testShape4 = testSlide.insertShape(SlidesApp.ShapeType.RECTANGLE, U1 * 3, U1 * 3, U1, U1); // create test shape + var testShape5 = testSlide.insertShape(SlidesApp.ShapeType.RECTANGLE, U1 * 4, U1 * 4, U1, U1); // create test shape + var testShape6 = testSlide.insertShape(SlidesApp.ShapeType.RECTANGLE, U1 * 5, U1 * 5, U1, U1); // create test shape + + testShape1.getFill().setSolidFill(0, 255, 0); // green + testShape2.getFill().setSolidFill(0, 255, 0); // green + testShape3.getFill().setSolidFill(0, 255, 0); // green + testShape4.getFill().setSolidFill(0, 255, 0); // green + testShape5.getFill().setSolidFill(0, 255, 0); // green + testShape6.getFill().setSolidFill(0, 255, 0); // green + + var shapeArray1 = [testShape1, testShape2]; + var shapeArray2 = [testShape3, testShape4]; + + var group1 = testSlide.group(shapeArray1); + var group2 = testSlide.group(shapeArray2); + + group1.select(); + + // It's currently not possible to programatically select an individual shape inside of a group + /* + group2.select(false); + testShape3.select(false); + */ + + testShape5.select(false); + + menuSetColorHue0(); // red (255, 0, 0) + + var isRed = function (rgbColor) { return rgbColor.getRed() == 255 & rgbColor.getGreen() == 0 & rgbColor.getBlue() == 0; } + var isGreen = function (rgbColor) { return rgbColor.getRed() == 0 & rgbColor.getGreen() == 255 & rgbColor.getBlue() == 0; } + + // Test that both shapes on group changed their background color to red (hue = 0) + t.ok(isRed(testShape1.getFill().getSolidFill().getColor().asRgbColor())); // it's okay to assume the color is a RgbColor here, because that's what we used on the test setup (instead of ThemeColor) + t.ok(isRed(testShape2.getFill().getSolidFill().getColor().asRgbColor())); + + /* + t.ok(isRed(testShape3.getFill().getSolidFill().getColor().asRgbColor())); // not tested because of the problem above + */ + t.ok(isGreen(testShape4.getFill().getSolidFill().getColor().asRgbColor())); // not selected, so it shouldn't change color + + t.ok(isRed(testShape5.getFill().getSolidFill().getColor().asRgbColor())); + t.ok(isGreen(testShape6.getFill().getSolidFill().getColor().asRgbColor())); // not selected, so it shouldn't change color + + testSlide.remove(); + }); + test.finish(); -} \ No newline at end of file +} + +function debugPrompt(message) { + SlidesApp.getUi().alert("Test Debug", message, SlidesApp.getUi().ButtonSet.OK); + } \ No newline at end of file