Merge pull request #894 from cycomachead/url-fix

Fix the loading of URLs to be consistent.
pull/3/merge
Jens Mönig 2015-07-28 10:48:48 +02:00
commit 8b17e7089a
1 zmienionych plików z 3 dodań i 3 usunięć

6
gui.js
Wyświetl plik

@ -90,7 +90,7 @@ var baseURL = (function getPath(location) {
path = location.pathname; // starts with a /
origin = location.origin; // has no trailing /
slash = path.lastIndexOf('/');
path = path.slice(0, slash); // keep a trailing /
path = path.slice(0, slash + 1); // keep a trailing /
return origin + path;
}(window.location));
@ -2563,10 +2563,10 @@ IDE_Morph.prototype.projectMenu = function () {
function () {
// read a list of libraries from an external file,
var libMenu = new MenuMorph(this, 'Import library'),
libUrl = baseURL + '/libraries/' + 'LIBRARIES';
libUrl = baseURL + 'libraries/' + 'LIBRARIES';
function loadLib(name) {
var url = baseURL + '/libraries/' + name + '.xml';
var url = baseURL + 'libraries/' + name + '.xml';
myself.droppedText(myself.getURL(url), name);
}