Skip to content

Instantly share code, notes, and snippets.

@raytiley
Created July 12, 2013 00:31
Show Gist options
  • Save raytiley/5980470 to your computer and use it in GitHub Desktop.
Save raytiley/5980470 to your computer and use it in GitHub Desktop.
Probably a shameful example of how to do things wrong.
embedCode: function() {
var config = this.get('show.location.vodConfiguration');
if(!config || !config.get('isLoaded'))
return '';
var fileName = this.get('fileName'),
baseUrl = config.get('baseUrl'),
template = config.get('embedTemplate');
return template.replace("#BASEURL#", baseUrl, "gi").replace("#FILENAME#", fileName, "gi");
}.property('show.location.vodConfiguration.baseUrl'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment