config.js
467 Bytes
function getDomain() {
var domainArr = document.domain.split('.');
var length = domainArr.length;
if (length > 1 && isNaN(domainArr[length - 1])) {
return '.' + domainArr[length - 2] + '.' + domainArr[length - 1];
} else {
return document.domain;
}
}
module.exports = {
version: '1.0',
yasPath: '/web/',
yasDomain: getDomain(),
yasImgDomain: '//analytics.m.yohobuy.com/yas.gif',
yasMobileDomain: '//analytics.m.yohobuy.com/yas_mobile'
};