added interactive and rstudio check back
diff --git a/R/print.R b/R/print.R
index 61193df..95a37c0 100644
--- a/R/print.R
+++ b/R/print.R
@@ -1,7 +1,7 @@
 #' @export
 print.kableExtra <- function(x, ...) {
   view_html <- getOption("kableExtra_view_html", TRUE)
-  if (view_html) {
+  if (view_html & interactive() & rstudioapi::isAvailable()) {
     dep <- list(
       rmarkdown::html_dependency_jquery(),
       rmarkdown::html_dependency_bootstrap(theme = "cosmo"),