Skip to content

Instantly share code, notes, and snippets.

@debrice

debrice/config.js

Created Nov 6, 2016
Embed
What would you like to do?
function CSS_compute_middleware(css, next) {
if(this.foo === 'bar'){
css.padding = 0;
}
return next(css)
}
function CSS_async_compute_middleware(css, next) {
if(this.bar === 'foo'){
ajax('/api/blah').then(next)
}else{
return next(css)
}
}
reveal.css_middlewares = [
CSS_compute_middleware,
CSS_async_compute_middleware,
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment