Replace Discourse.script global with a module

This commit is contained in:
Robin Ward
2015-03-09 12:32:54 -04:00
parent fc962eb378
commit fb726cfa0c
5 changed files with 22 additions and 20 deletions

View File

@ -0,0 +1,5 @@
export default function loadScript(url) {
return new Ember.RSVP.Promise(function(resolve) {
$LAB.script(Discourse.getURL(url)).wait(() => resolve());
});
}