2013-11-16 21:15:31 +00:00
|
|
|
define(function() {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var config = {
|
|
|
|
"css": true,
|
2013-11-17 10:27:48 +00:00
|
|
|
"lang": (navigator.language || navigator.userLanguage).split("-")[0],
|
2013-11-16 21:15:31 +00:00
|
|
|
"reply-to-self": false
|
|
|
|
};
|
|
|
|
|
|
|
|
var js = document.getElementsByTagName("script");
|
|
|
|
|
|
|
|
for (var i = 0; i < js.length; i++) {
|
|
|
|
[].forEach.call(js[i].attributes, function(attr) {
|
|
|
|
if (/^data-isso-/.test(attr.name)) {
|
|
|
|
try {
|
|
|
|
config[attr.name.substring(10)] = JSON.parse(attr.value);
|
|
|
|
} catch (ex) {
|
|
|
|
config[attr.name.substring(10)] = attr.value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
return config;
|
|
|
|
|
|
|
|
});
|