kopia lustrzana https://github.com/backface/turtlestitch
Delete the getURLsSbeOrRelative(url) function
This function was only used for tools.xml, and didnt even do its job... As of this writing, it simply prepended the `baseURL` variable, which is determined by the Snap! server, not s.b.e. If we want to have s.b.e as a permanent fallback source we should re-implement this in a way that is used for all Snap! media.dev
rodzic
36e0dae11d
commit
2b69b91a4a
20
gui.js
20
gui.js
|
@ -2559,9 +2559,7 @@ IDE_Morph.prototype.projectMenu = function () {
|
||||||
'Import tools',
|
'Import tools',
|
||||||
function () {
|
function () {
|
||||||
myself.droppedText(
|
myself.droppedText(
|
||||||
myself.getURLsbeOrRelative(
|
myself.getURL('tools.xml'),
|
||||||
'tools.xml'
|
|
||||||
),
|
|
||||||
'tools'
|
'tools'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -4483,22 +4481,6 @@ IDE_Morph.prototype.getURL = function (url) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
IDE_Morph.prototype.getURLsbeOrRelative = function (url) {
|
|
||||||
var request = new XMLHttpRequest(),
|
|
||||||
myself = this;
|
|
||||||
try {
|
|
||||||
request.open('GET', baseURL + url, false);
|
|
||||||
request.send();
|
|
||||||
if (request.status === 200) {
|
|
||||||
return request.responseText;
|
|
||||||
}
|
|
||||||
return myself.getURL(url);
|
|
||||||
} catch (err) {
|
|
||||||
myself.showMessage(err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// IDE_Morph user dialog shortcuts
|
// IDE_Morph user dialog shortcuts
|
||||||
|
|
||||||
IDE_Morph.prototype.showMessage = function (message, secs) {
|
IDE_Morph.prototype.showMessage = function (message, secs) {
|
||||||
|
|
Ładowanie…
Reference in New Issue