Skip to content

Instantly share code, notes, and snippets.

@MarcinKosinski
Created April 20, 2016 19:36
Show Gist options
  • Save MarcinKosinski/d1655939ba3666359ea74fd0cccc3963 to your computer and use it in GitHub Desktop.
Save MarcinKosinski/d1655939ba3666359ea74fd0cccc3963 to your computer and use it in GitHub Desktop.
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
sidebarMenu(
menuItem(
"Comments",
tabName = "disqus_here",
icon = icon("info")
)
)
),
dashboardBody(
tabItems(
tabItem(tabName = "disqus_here",
div(id="disqus_thread",
HTML(
"<script>
(function() {
var d = document, s = d.createElement('script');
s.src = '//CHANEL_NAME.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href='https://disqus.com/?ref_noscript' rel='nofollow'>comments powered by Disqus.</a></noscript>"
)
)
)
),
div(HTML('<script id="dsq-count-scr" src="//CHANEL_NAME.disqus.com/count.js" async></script>'))
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment