2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-12 21:10:47 +08:00

Fix browser-update.js so it doesn't depend on jQuery

This commit is contained in:
Neil Lalonde 2013-11-27 12:26:27 -05:00
parent 3442d3adb2
commit 8a9bef944f
3 changed files with 6 additions and 7 deletions

View file

@ -11,7 +11,7 @@ var $buo = function() {
}

// retrieve localized browser upgrade text
var t = I18n.t('js.browser_update');
var t = <%= "'" + I18n.t('js.browser_update') + "'" %>;

// create the notification div HTML
var div = document.createElement("div");
@ -30,10 +30,12 @@ var $buo = function() {
sheet.innerHTML = style;
}
catch(e) {
console.log(e);
try {
sheet.styleSheet.cssText = style;
}
catch(ex) {
console.log('failed to add the css');
return;
}
}
@ -43,8 +45,6 @@ var $buo = function() {

};

$(function() {
$bu=$buo();
});
$bu=$buo();

})(this);