Skip to content

Commit

Permalink
play well with shinymanager
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Aug 4, 2019
1 parent 54f5eff commit e43a7da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: shinylogs
Title: Record Everything that Happens in a 'Shiny' Application
Version: 0.1.6
Version: 0.1.6.900
Authors@R: c(person("Fanny", "Meyer", email = "[email protected]", role = c("aut")),
person("Victor", "Perrier", email = "[email protected]", role = c("aut", "cre")),
person("Silex Technologies", comment = "https://www.silex-ip.com", role = "fnd"),
Expand Down
19 changes: 16 additions & 3 deletions inst/assets/js/shinylogs-localForage.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ if (logsonunload === false) {
}

// Shiny input event to not track
var dontTrack = [ ".shinylogs_lastInput", ".shinylogs_input", ".shinylogs_error", ".shinylogs_output", ".shinylogs_browserData" ];
var dontTrack = [
".shinylogs_lastInput",
".shinylogs_input",
".shinylogs_error",
".shinylogs_output",
".shinylogs_browserData",
".shinymanager_timeout"
];

if (config.hasOwnProperty("exclude_input_id")) {
dontTrack = dontTrack.concat(config.exclude_input_id);
}
Expand All @@ -95,8 +103,13 @@ var hiddenRE = RegExp("hidden$");
// Track INPUTS
$(document).on("shiny:inputchanged", function(event) {
//console.log(event);
if (dontTrack.indexOf(event.name) == -1 & hiddenRE.test(event.name) === false & inputRE.test(event.name) === false) {
//console.log(event);
if (
(dontTrack.indexOf(event.name) == -1) &
(hiddenRE.test(event.name) === false) &
(inputRE.test(event.name) === false) &
(event.inputType != "shiny.password")
) {
//console.log(event); "shiny.password"
var ts = dayjs(event.timeStamp).format();
var inputId = 'input' + generateId();
var lastInput = {
Expand Down

0 comments on commit e43a7da

Please sign in to comment.