-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
31 lines (27 loc) · 978 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
28
29
30
31
$(document).ready(function() {
$('.materialboxed').materialbox();
// get started button scrolling
(function() {
var btn = document.getElementById('get-started-btn'),
tgtSection = document.getElementById('quick-start');
btn.onclick = function() {
$(document.body).animate({
'scrollTop': $('#quick-start').offset().top
}, 500);
};
})();
// Get the latest version name and update the main link
$.ajax({
url: 'https://api.github.com/repos/deepforge-dev/deepforge/releases/latest'
}).done(function(data) {
var releaseAnchor = $('#latest-version');
if (data) {
releaseAnchor.text(data.name);
}
});
// Make sure all anchors change the host page if embedded in iframe
var anchors = document.getElementsByTagName('a');
for (var i = anchors.length; i--;) {
anchors[i].setAttribute('target','_top');
}
});