Fix simulator links if using URLs like `index.html` or `../#` (#122)
parent
22a2f75bd4
commit
c1e414a0c5
3
index.js
3
index.js
|
|
@ -308,7 +308,8 @@ function refreshLibrary() {
|
|||
return;
|
||||
}
|
||||
var baseurl = window.location.href;
|
||||
var url = baseurl+"apps/"+app.id+"/"+file.url;
|
||||
baseurl = baseurl.substr(0,baseurl.lastIndexOf("/"));
|
||||
var url = baseurl+"/apps/"+app.id+"/"+file.url;
|
||||
window.open(`https://espruino.com/ide/emulator.html?codeurl=${url}&upload`);
|
||||
} else if (icon.classList.contains("icon-upload")) {
|
||||
// upload
|
||||
|
|
|
|||
Loading…
Reference in New Issue