Skip to content

Instantly share code, notes, and snippets.

@danscotton
Created June 20, 2012 11:36
Show Gist options
  • Save danscotton/2959467 to your computer and use it in GitHub Desktop.
Save danscotton/2959467 to your computer and use it in GitHub Desktop.
/*global define:true */
define(
[
'module/bootstrap',
'module/timestamp',
'module/imageenhancer',
'module/transclude',
'module/hyperpuff/hyperpuff'
], function(
news,
Timestamp,
ImageEnhancer,
Transclude,
hyperpuff
) {
return {
init: function() {
var t = new Timestamp(new Date(new Date().toUTCString()).getTime()),
ie = new ImageEnhancer('.story-body img'),
transcluder = new Transclude();
hyperpuff.init( transcluder );
}
};
}
);
@danscotton
Copy link
Author

the transcluder gets passed to the hyperpuff, and it's up to the hyperpuff to fetch the content and set up the complete events.

we could even have one transcluder on news.transcluder that could be used from anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment