Change nightly button link to public install page after 60s
This commit is contained in:
parent
de801a93aa
commit
3c4a077149
1 changed files with 10 additions and 12 deletions
22
index.html
22
index.html
|
@ -84,19 +84,17 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
var nightly = function() {
|
addButtonInfo("https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug-bitrise-signed.apk/info", "#nightly-button", "#nightly-version",
|
||||||
addButtonInfo("https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug-bitrise-signed.apk/info", "#nightly-button", "#nightly-version",
|
function(button, version, res) {
|
||||||
function(button, version, res) {
|
var json = JSON.parse(res.responseText);
|
||||||
var json = JSON.parse(res.responseText);
|
button.href = json.expiring_download_url;
|
||||||
button.href = json.url;
|
version.innerHTML = "v" + json.build_number;
|
||||||
version.innerHTML = "v" + json.latestVersionCode;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
};
|
|
||||||
|
|
||||||
nightly();
|
setTimeout(function() {
|
||||||
|
button.href = json.public_install_page_url;
|
||||||
setInterval(nightly, 60 * 1000);
|
}, 60 * 100);
|
||||||
|
}
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue