mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Fix browser-update.js so it doesn't depend on jQuery
This commit is contained in:
parent
3442d3adb2
commit
8a9bef944f
3 changed files with 6 additions and 7 deletions
|
@ -11,7 +11,6 @@
|
|||
//= require bootstrap-dropdown.js
|
||||
//= require bootstrap-modal.js
|
||||
//= require bootstrap-transition.js
|
||||
//= require browser-update.js
|
||||
//= require chosen.jquery.js
|
||||
//= require ember-renderspeed.js
|
||||
//= require favcount.js
|
||||
|
@ -70,5 +69,3 @@
|
|||
//= require_tree ./discourse/helpers
|
||||
//= require_tree ./discourse/templates
|
||||
//= require_tree ./discourse/routes
|
||||
|
||||
//= require browser-update.js
|
||||
|
|
|
@ -20,3 +20,5 @@
|
|||
Discourse.Router.map(function() { Discourse.routeBuilder.call(this); });
|
||||
Discourse.start()
|
||||
</script>
|
||||
|
||||
<%= javascript_include_tag 'browser-update' %>
|
||||
|
|
|
@ -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);
|
Loading…
Reference in a new issue