mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Frees "production" code from adjustments for out-of-source developer code
20 lines
467 B
JavaScript
20 lines
467 B
JavaScript
var xhr = new XMLHttpRequest(),
|
|
path = "../../webodf/lib",
|
|
runtimeFilePath = path + "/runtime.js",
|
|
code;
|
|
|
|
xhr.open("GET", runtimeFilePath, false);
|
|
xhr.send(null);
|
|
code = xhr.responseText;
|
|
code += "\n//# sourceURL=" + runtimeFilePath;
|
|
code += "\n//@ sourceURL=" + runtimeFilePath; // Chrome
|
|
eval(code);
|
|
|
|
// adapt for out-of-sources run
|
|
runtime.currentDirectory = function () {
|
|
return path;
|
|
};
|
|
runtime.libraryPaths = function () {
|
|
return [path];
|
|
};
|