Make the back button work again, uses the browser history directly now.

This commit is contained in:
Mohammed Nafees 2017-06-07 15:51:27 +05:30
parent e5ac3eeea7
commit 608becef7d

View file

@ -25,9 +25,7 @@
var canWriteAssets = false;
var xmlHttpRequest = null;
var isPreparing = false; // Explicitly track download request status.
var lastPage = "https://metaverse.highfidelity.com/marketplace?";
function injectCommonCode(isDirectoryPage) {
// Supporting styles from marketplaces.css.
@ -67,7 +65,7 @@
// Footer actions.
$("#back-button").on("click", function () {
window.location = lastPage;
window.history.back();
});
$("#all-markets").on("click", function () {
EventBridge.emitWebEvent(GOTO_DIRECTORY);
@ -344,12 +342,7 @@
}
}
function locationChanged() {
lastPage = location.href;
}
// Load / unload.
window.addEventListener("load", onLoad); // More robust to Web site issues than using $(document).ready().
window.addEventListener("hashchange", locationChanged);
}());