Merge branch 'main' into infra/bumpversion

This commit is contained in:
cami 2021-07-24 02:08:39 +02:00
commit 74ca8d8973
2 changed files with 13 additions and 14 deletions

View file

@ -2,11 +2,6 @@ import React from "react";
import "../App.css";
export default function GeneratedPassword(props) {
const handleOnCopyEvent = (e) => {
e.preventDefault();
return false;
};
return (
<>
<p>

View file

@ -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 = "";
}
};