var domready = require('domready'),
addBootstrapLink = require('./js/addBootstrapLink');
var outdatedBrowser = function(options) {
var outdated = document.getElementById("outdated");
this.defaultOpts = { // this === undefined - Вот тут ошибка
bgColor: '#f25648',
color: '#ffffff',
lowerThan: 'transform',
languagePath: '../outdatedbrowser/lang/en.html'
}
// code...
};
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
domready(function () {
addBootstrapLink(function () {
function appendHtml(el, str) {
var div = document.createElement('div');
div.innerHTML = str;
while (div.children.length > 0) {
el.appendChild(div.children[0]);
}
}
var outdate = '<div id="outdated"></div>'
appendHtml(document.body, outdate);
addLoadEvent(function() {
outdatedBrowser({
lowerThan: 'transform',
languagePath: ' '
});
});
});
});