var csInterface = new CSInterface();
var appName = csInterface.hostEnvironment.appName;
var extensionId = csInterface.getExtensionID();
var url = "https://learning.isograd.com/adobe";
var adobeEvent = null;

switch (appName) { // Illustrator by default is persistent
    case "IDSN":
        adobeEvent = new CSEvent("com.adobe.InDesignPersistent", "APPLICATION");
        break;
    case "PHSP":
    case "PHXS":
        adobeEvent = new CSEvent("com.adobe.PhotoshopPersistent", "APPLICATION");
        break;
    case "PPRO":
        csInterface.evalScript("app.setExtensionPersistent('" + extensionId + "', 1);");
        break;
}

if (adobeEvent) {
    adobeEvent.extensionId = extensionId;
    csInterface.dispatchEvent(adobeEvent);
}

location.replace(url);