-
Notifications
You must be signed in to change notification settings - Fork 109
/
index.html
110 lines (98 loc) · 4.63 KB
/
index.html
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!doctype html>
<base href="#">
<html lang="en">
<head>
<meta charset="utf-8">
<title>NASA Open APIs</title>
<link rel = "shortcut icon" href = "assets/img/favicons/favicon.ico">
<base href="https://nasa.github.io/api-docs-stage/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- We participate in the US government's analytics program. See the data at analytics.usa.gov. -->
<script async type="text/javascript" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=NASA" id="_fed_an_ua_tag"></script>
</head>
<link rel="stylesheet" href="assets/css/nasawds.min.css">
<link rel="stylesheet" href="assets/css/indexFormat.css">
<body>
<script src="assets/js/nasawds.js"></script>
<script src = "assets/js/jquery.min.js"></script>
<script src="assets/js/gui.js"></script>
<script src="assets/js/APILoader.js"></script>
<script src="assets/js/setup.js"></script>
<script src="assets/js/contentLoader.js"></script>
<script src= "assets/footer/OIT-footer.js"></script>
<div class="usa-overlay"></div>
<main id="main-content">
<section class="usa-section" id = "signUp">
<div class = "usa-grid">
<h2>Generate API Key</h2>
<div id="apidatagov_signup" onfocusin = 'new function(){$("#headerSearch").css("display","none");}' >Loading signup form...</div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var apiUmbrellaSignupOptions = {
// Pick a short, unique name to identify your site, like 'gsa-auctions'
// in this example.
registrationSource: 'web-admin',
// Enter the API key you signed up for and specially configured for this
// API key signup embed form.
apiKey: 'jfr9uihqvncOuii7lda5bDlsvOIDePcKTLWlzLte',
// Provide a URL or e-mail address to be used for customer support.
//
// The format for e-mail addresses can be given as either
// 'example@example.com' or 'mailto:example@example.com'.
contactUrl: 'mailto:hq-open-innovation@mail.nasa.gov',
// Provide the name of your developer site. This will appear in the
// subject of the welcome e-mail as "Your {{siteName}} API key".
siteName: 'https://api.nasa.gov',
//
emailFromName: 'NASA',
// Provide an example URL you want to show to users after they signup.
// This can be any API endpoint on your server, and you can use the
// special {{api_key}} variable to automatically substitute in the API
// key the user just signed up for.
exampleApiUrl: 'https://api.nasa.gov/planetary/apod?api_key={{api_key}}'
};
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var apiUmbrella = document.createElement('script');
apiUmbrella.type = 'text/javascript';
apiUmbrella.async = true;
apiUmbrella.src = 'https://api.data.gov/static/javascripts/signup_embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(apiUmbrella);
asyncCall();
})();
</script>
<noscript>Please enable JavaScript to signup for an <a href="http://api.data.gov/">api.data.gov</a> API key.</noscript>
</div>
</section>
</main>
<script>
insertBlockXatY("assets/html/header.html","Body",true);
insertBlockXatY("assets/html/overview.html","Main",true);
insertBlockXatY("assets/html/authentication.html","Main");
insertBlockXatY("assets/html/recoverKey.html","Main");
insertBlockXatY("assets/html/browseAPI.html","Main");
loadContent();
console.log(this);
</script>
<script>
// This function checks the URL address for the presence of something after the main domain like `#apod`.
// If it finds it, it then triggers a click on any element with that as its ID.
// This allows users to share a link directly to information for a specific API.
function checkURL(){
URL_string = window.location.href
if (URL_string.indexOf('#') > 0){
heading_1_id = URL_string.replace("https://api.nasa.gov/#","").replace("http://localhost:8000/#","")
console.log("trying to click on element =",heading_1_id)
document.getElementById(heading_1_id).click();
}
}
// Due to some of the DOM being loaded via JavaScript after the initial dom load, we are waiting 1/2 second to trigger the click.
$(document).ready(function(){
setTimeout(function () {
checkURL()
},
4000
);
})
</script>
</html>