Let webapp load models fron URL after plugins

This commit is contained in:
JannisX11 2020-09-27 17:18:15 +02:00
parent f992eccbb5
commit 01ed8ccbad
2 changed files with 11 additions and 5 deletions

View File

@ -106,7 +106,9 @@ Modes.options.start.select()
loadInstalledPlugins().then(plugins => {
if (isApp) {
loadOpenWithBlockbenchFile()
loadOpenWithBlockbenchFile();
} else {
loadInfoFromURL();
}
})

View File

@ -14,6 +14,13 @@ function initializeWebApp() {
if (!Blockbench.isMobile) {
$('#web_download_button').show()
}
if (Blockbench.browser == 'firefox') {
document.body.style.imageRendering = 'crisp-edges'
}
}
function loadInfoFromURL() {
if (location.hash.substr(1, 8) == 'session=') {
EditSession.dialog()
$('#edit_session_token').val(location.hash.substr(9))
@ -33,11 +40,8 @@ function initializeWebApp() {
}
})
}
if (Blockbench.browser == 'firefox') {
document.body.style.imageRendering = 'crisp-edges'
}
}
setInterval(function() {
Prop.zoom = Math.round(devicePixelRatio*100)
}, 500)