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"; 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;