我目前正在为 Google 表格发布和发布插件。在 Google 对该插件进行审查后,他们表示该插件将在刷新工作表时自动启动。
如何更改我的代码以使其通过 Google 审核?
编辑:
function onOpen() {
var DocObject = PropertiesService.getDocumentProperties().getProperties();
//paid = "true" if bought. paid = "false" if not bought. These
//are strings not bool values
var paid = DocObject.Bought;
if(paid)
{
SpreadsheetApp.getUi().createMenu('aPLM')
.addItem('Open Menu', 'showMenu')
.addToUi();
} else
{
SpreadsheetApp.getUi().createMenu('aPLM')
.addItem('Start Registration', 'noTrial')
.addItem('Open Menu', 'showMenu')
.addToUi();
}
}