From 55cf90d31a421d2a0d7228d238df308633e23983 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 16 Feb 2024 17:25:00 -0600 Subject: [PATCH] the WS object is created from servr now: https://github.com/yihui/servr/commit/b7845626c1f4cb60b41b828518bc9407505466c2 --- DESCRIPTION | 5 +++-- NEWS.md | 1 + inst/rmarkdown/templates/xaringan/resources/js/ws-handler.js | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c754ec5..e9d1a99 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: xaringan Type: Package Title: Presentation Ninja -Version: 0.29.1 +Version: 0.29.2 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person(given = "Posit Software, PBC", role = c("cph", "fnd")), @@ -46,7 +46,7 @@ Depends: R (>= 3.5.0) Imports: htmltools, knitr (>= 1.30), - servr (>= 0.29), + servr (>= 0.29.2), xfun (>= 0.18), rmarkdown (>= 2.8) Suggests: rstudioapi, jsonlite, testit @@ -56,3 +56,4 @@ BugReports: https://github.com/yihui/xaringan/issues VignetteBuilder: knitr Encoding: UTF-8 RoxygenNote: 7.3.1 +Remotes: yihui/servr diff --git a/NEWS.md b/NEWS.md index 3c3c527..8016478 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # CHANGES IN xaringan VERSION 0.30 +- `inf_mr()` fails to work when the slides URL contains a hash. # CHANGES IN xaringan VERSION 0.29 diff --git a/inst/rmarkdown/templates/xaringan/resources/js/ws-handler.js b/inst/rmarkdown/templates/xaringan/resources/js/ws-handler.js index fe1e4bc..e30719a 100644 --- a/inst/rmarkdown/templates/xaringan/resources/js/ws-handler.js +++ b/inst/rmarkdown/templates/xaringan/resources/js/ws-handler.js @@ -1,5 +1,4 @@ -((interval, path) => { -const ws = new WebSocket(location.href.replace(/^http/, 'ws').replace(/\/?$/, '/websocket/')); +((interval, path, ws) => { let flag, focused = false; window.addEventListener('focus', e => { focused = true; });