Fixed locale script to no longer use eval() (and work locally in chrome)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1995 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
e9945a5f02
commit
90fffe8a09
|
@ -304,15 +304,15 @@ var svgEditor = (function($, Editor) {
|
||||||
|
|
||||||
var url = conf.langPath + "lang." + lang_param + ".js";
|
var url = conf.langPath + "lang." + lang_param + ".js";
|
||||||
|
|
||||||
$.ajax({
|
$.getScript(url, function(d) {
|
||||||
'url': url,
|
// Fails locally in Chrome 5+
|
||||||
'dataType': "script",
|
if(!d) {
|
||||||
error: function(xhr) {
|
var s = document.createElement('script');
|
||||||
if(xhr.responseText) {
|
s.src = url;
|
||||||
Editor.readLang(eval(xhr.responseText));
|
document.querySelector('head').appendChild(s);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return Editor;
|
return Editor;
|
||||||
|
|
Loading…
Reference in New Issue