I am trying to make this add-on plugin that can help me and other to export sheet in to JSON. In my testing it's the menu shows up and all the functionality works (as you see in screenshots). When I sent for publish on Google Web Store the "Docs Add-ons Advisor" don't see the menu in the review. So as "Docs Add-ons Advisor" suggested I published it "Unlisted" to see if it work on my side. And it doesn't work. Here is the code I am using and links. Can anyone tell me what I am doing wrong and help me fix it.
Plugin (Unlisted): https://chrome.google.com/webstore/detail/export-to-json/fcnpcmlbpljkcehfcgllklhbgppinbdd?hl=en-US&gl=US&authuser=0
Reference:
Code:
function onInstall(e) {
onOpen(e);
}
function onOpen(e) {
var menu = SpreadsheetApp.getUi().createAddonMenu(); // Or DocumentApp or FormApp.
if (e && e.authMode == ScriptApp.AuthMode.NONE) {
// Add a normal menu item (works in all authorization modes).
menu.addItem('Export to JSON', 'exportInit');
} else {
// Add a menu item based on properties (doesn't work in AuthMode.NONE).
var properties = PropertiesService.getDocumentProperties();
var workflowStarted = properties.getProperty('workflowStarted');
if (workflowStarted) {
menu.addItem('Start to JSON', 'startJson');
} else {
menu.addItem('Export to JSON', 'exportInit');
}
}
menu.addToUi();
}
function startJson(){
...code...
}
function exportInit() {
..code..
}