showMessage <- function(fun, msg = "Loading ...", ...) {
force(fun)
args <- c(list(...), message = msg)
function(...) {
progress <- shiny::Progress$new()
on.exit(progress$close())
do.call(progress$set, args)
fun(...)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.