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-75d572ba1ddd
master
Alexis Deveria 2011-02-11 19:21:50 +00:00
parent e9945a5f02
commit 90fffe8a09
1 changed files with 7 additions and 7 deletions

View File

@ -304,15 +304,15 @@ var svgEditor = (function($, Editor) {
var url = conf.langPath + "lang." + lang_param + ".js";
$.ajax({
'url': url,
'dataType': "script",
error: function(xhr) {
if(xhr.responseText) {
Editor.readLang(eval(xhr.responseText));
}
$.getScript(url, function(d) {
// Fails locally in Chrome 5+
if(!d) {
var s = document.createElement('script');
s.src = url;
document.querySelector('head').appendChild(s);
}
});
};
return Editor;