-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.js
27 lines (25 loc) · 922 Bytes
/
main.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
27
$(document).ready(function() {
function init(isAPIAvailable) {
if (isAPIAvailable) {
// Check to see if there is an internet connection.
$.ajax({
type: "HEAD",
url: "http://stats.adobe.com/",
success: function() {
var appView = new ADOBE.AppView(isAPIAvailable);
},
// Display the offline messaging if unable to connect.
error: function() {
$("body").append("<div id='imageContainer'><img id='bgImage' src='offline.gif' width='768' height='1024'></div>");
}
})
} else {
new ADOBE.AppView(false);
}
}
// To test on the desktop remove the JavaScript include for AdobeLibraryAPI.js.
if (typeof adobeDPS == "undefined") // Call init() immediately. This will be the case for dev on the desktop.
init(false);
else // API is available so wait for adobeDPS.initializationComplete.
adobeDPS.initializationComplete.addOnce(function(){ init(true) });
});