Created
November 6, 2016 22:09
-
-
Save typehorror/c38678a064fe8ab09012ec4b7bb09471 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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