Last active
March 2, 2021 18:16
-
-
Save stuart-warren/f24acd82a8d8884ba659832a4714e97d to your computer and use it in GitHub Desktop.
Google Workspace countdown timer add-on
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
function onOpen(e) { | |
DocumentApp.getUi().createAddonMenu() | |
.addItem('Start', 'showSidebar') | |
.addToUi(); | |
showSidebar() | |
} | |
function onInstall(e) { | |
onOpen(e); | |
} | |
function showSidebar() { | |
var ui = HtmlService.createHtmlOutputFromFile('Sidebar') | |
.setTitle('CountdownSidebar') | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME); | |
DocumentApp.getUi().showSidebar(ui); | |
} |
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
No data is gathered |
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
Copyright 2021 stuart-warren | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to install: http://www.cs.ucr.edu/~vahid/usefulstuff/gdoc_addon/
How to publish: https://developers.google.com/workspace/add-ons/how-tos/publish-add-on-overview