diff --git a/frontend/src/components/GeneratedPassword.jsx b/frontend/src/components/GeneratedPassword.jsx index 1dfb3af..7536737 100644 --- a/frontend/src/components/GeneratedPassword.jsx +++ b/frontend/src/components/GeneratedPassword.jsx @@ -2,11 +2,6 @@ import React from "react"; import "../App.css"; export default function GeneratedPassword(props) { - const handleOnCopyEvent = (e) => { - e.preventDefault(); - return false; - }; - return ( <>
diff --git a/frontend/src/components/pages/Study.jsx b/frontend/src/components/pages/Study.jsx index 2694809..48e4718 100644 --- a/frontend/src/components/pages/Study.jsx +++ b/frontend/src/components/pages/Study.jsx @@ -32,11 +32,8 @@ export default function Study() { useEffect(() => { _logger.current = new Logger({ - //inputs: ["cursor", "wheel", "keyboard", "touch"], - inputs: ["keyboard"], - // apiUrl: "https://behavior.marcocamenzind.ch", - apiUrl: "http://localhost:5000", - logToConsole: true, + inputs: ["keyboard", "wheel", "cursor", "custom"], + apiUrl: "https://behavior.marcocamenzind.ch", }); _logger.current.init(); authFetch("/api/username", { @@ -112,13 +109,20 @@ export default function Study() { receiveRandomPassword(); setState(STATES.NORMAL); handleLoggerOn(); + // map username and session with the logs + _logger.current.logCustomEvent( + { + name: serverUsername, + }, + ); }; const resetInputValues = () => { - let inputElements = document.querySelectorAll('div input:not([type="submit"])'); - for (let i=0; i < inputElements.length; i++){ - inputElements[i].value = "" - + let inputElements = document.querySelectorAll( + 'div input:not([type="submit"])' + ); + for (let i = 0; i < inputElements.length; i++) { + inputElements[i].value = ""; } };