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
14
index.html
14
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.url;
|
button.href = json.expiring_download_url;
|
||||||
version.innerHTML = "v" + json.latestVersionCode;
|
version.innerHTML = "v" + json.build_number;
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
button.href = json.public_install_page_url;
|
||||||
|
}, 60 * 100);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
};
|
|
||||||
|
|
||||||
nightly();
|
|
||||||
|
|
||||||
setInterval(nightly, 60 * 1000);
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue