-
Notifications
You must be signed in to change notification settings - Fork 6
/
Menu.js
26 lines (24 loc) · 979 Bytes
/
Menu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// This function runs when a spreadsheet file is opened
// Adds options to menu, if the code is inside an add-on it will add the options in a submenu in Add-ons
function onOpen(e){
var ui = SpreadsheetApp.getUi();
var menuLabels = getDevSettings().getMenuLabels();
ui.createMenu('LatexKit')
.addItem(menuLabels['singleTable'], 'menuMakeTable')
.addItem(menuLabels['donateFunny'], 'showPayPalDonations')
.addItem(menuLabels['allTables'], 'menuExportAllTabs')
.addSeparator()
.addItem(menuLabels['showSettings'], 'menuShowSettingsSheet')
.addItem(menuLabels['updateSettings'], 'updateSettingsSheet')
.addSeparator()
.addItem(menuLabels['singleData'], 'menuExportData')
.addItem(menuLabels['allData'], 'menuExportAllData')
.addSeparator()
.addItem(menuLabels['feedbackForm'], 'showFeedbackDialog')
.addItem(menuLabels['donate'], 'showPayPalDonations')
.addToUi();
}
function onInstall(e){
onOpen(e);
// Perform additional setup as needed.
}