mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:08:51 +02:00
Make the back button work again, uses the browser history directly now.
This commit is contained in:
parent
e5ac3eeea7
commit
608becef7d
1 changed files with 2 additions and 9 deletions
|
@ -25,9 +25,7 @@
|
||||||
var canWriteAssets = false;
|
var canWriteAssets = false;
|
||||||
var xmlHttpRequest = null;
|
var xmlHttpRequest = null;
|
||||||
var isPreparing = false; // Explicitly track download request status.
|
var isPreparing = false; // Explicitly track download request status.
|
||||||
|
|
||||||
var lastPage = "https://metaverse.highfidelity.com/marketplace?";
|
|
||||||
|
|
||||||
function injectCommonCode(isDirectoryPage) {
|
function injectCommonCode(isDirectoryPage) {
|
||||||
|
|
||||||
// Supporting styles from marketplaces.css.
|
// Supporting styles from marketplaces.css.
|
||||||
|
@ -67,7 +65,7 @@
|
||||||
|
|
||||||
// Footer actions.
|
// Footer actions.
|
||||||
$("#back-button").on("click", function () {
|
$("#back-button").on("click", function () {
|
||||||
window.location = lastPage;
|
window.history.back();
|
||||||
});
|
});
|
||||||
$("#all-markets").on("click", function () {
|
$("#all-markets").on("click", function () {
|
||||||
EventBridge.emitWebEvent(GOTO_DIRECTORY);
|
EventBridge.emitWebEvent(GOTO_DIRECTORY);
|
||||||
|
@ -344,12 +342,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function locationChanged() {
|
|
||||||
lastPage = location.href;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load / unload.
|
// Load / unload.
|
||||||
window.addEventListener("load", onLoad); // More robust to Web site issues than using $(document).ready().
|
window.addEventListener("load", onLoad); // More robust to Web site issues than using $(document).ready().
|
||||||
window.addEventListener("hashchange", locationChanged);
|
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in a new issue