2020-08-23 03:43:53 +08:00
|
|
|
function initPage() {
|
2020-08-24 01:23:58 +08:00
|
|
|
var backBtn = $j('#backBtn');
|
|
|
|
|
|
|
|
// Disable the back button if there is nothing to go back to
|
|
|
|
backBtn.prop('disabled', !document.referrer.length);
|
|
|
|
|
2020-08-23 03:43:53 +08:00
|
|
|
// Manage the BACK button
|
2020-08-24 01:23:58 +08:00
|
|
|
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {
|
2020-08-23 03:43:53 +08:00
|
|
|
evt.preventDefault();
|
|
|
|
window.history.back();
|
|
|
|
});
|
2020-08-24 01:23:58 +08:00
|
|
|
// Manage the REFRESH Button
|
|
|
|
document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) {
|
|
|
|
evt.preventDefault();
|
|
|
|
window.location.reload(true);
|
|
|
|
});
|
2020-08-23 03:43:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$j(document).ready(function() {
|
|
|
|
initPage();
|
|
|
|
});
|