diff --git a/js/onlineide/rightmenu.js b/js/onlineide/rightmenu.js index 22759c8..7fe7e4a 100644 --- a/js/onlineide/rightmenu.js +++ b/js/onlineide/rightmenu.js @@ -173,9 +173,13 @@ function importContractInstanceCodeByDOI() { } function openInClient() { + let path = document.location.pathname.lastIndexOf("/ide"); + if (path>0) + path = document.location.pathname.substr(0, path + 1); + else path = "/"; window.open(isBaaS ? - `${location.origin}/client/BaaSClient.html${location.search}` : - `${location.origin}/client/bdwareclient.html?self=true&` + + `${location.origin}${path}client/BaaSClient.html${location.search}` : + `${location.origin}${path}client/bdwareclient.html?self=true&` + `contract=${mainVue.contracts[selectedContract.value].id}`); }