Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Add a `browserUpdate` object to your environment:
var ENV = {
browserUpdate: {
vs: {i:9,f:2,o:9.63,s:2,c:10},
test: true
test: true,
minify: true
},
... // rest of environment
```
Expand All @@ -46,6 +47,8 @@ This config object is passed to browser-update as its `buoop` variable. Full doc

The `test: true` parameter always shows the header bar regardless of the browser - useful for testing.

The `minify: true` parameter determines if the addon should retrieve browser-update scripts minified.

Default values set up in the service are:
```
browserUpdate: {
Expand Down
4 changes: 3 additions & 1 deletion addon/services/browser-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export default Ember.Service.extend(Ember.Evented, {
_injectAfterDelay: function (delay) {
delay = delay || 100;
Ember.run.later(this, function () {
var config = this.get('config');
var extension = config.minify ? '.min.js' : '.js';
// inject the browser update script
var url = "https://browser-update.org/update.js";
var url = 'https://browser-update.org/update' + extension;
injectScript(url);
}, delay);
},
Expand Down