Merge branch 'main' into infra/bumpversion
This commit is contained in:
commit
74ca8d8973
2 changed files with 13 additions and 14 deletions
|
@ -2,11 +2,6 @@ import React from "react";
|
||||||
import "../App.css";
|
import "../App.css";
|
||||||
|
|
||||||
export default function GeneratedPassword(props) {
|
export default function GeneratedPassword(props) {
|
||||||
const handleOnCopyEvent = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -32,11 +32,8 @@ export default function Study() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
_logger.current = new Logger({
|
_logger.current = new Logger({
|
||||||
//inputs: ["cursor", "wheel", "keyboard", "touch"],
|
inputs: ["keyboard", "wheel", "cursor", "custom"],
|
||||||
inputs: ["keyboard"],
|
apiUrl: "https://behavior.marcocamenzind.ch",
|
||||||
// apiUrl: "https://behavior.marcocamenzind.ch",
|
|
||||||
apiUrl: "http://localhost:5000",
|
|
||||||
logToConsole: true,
|
|
||||||
});
|
});
|
||||||
_logger.current.init();
|
_logger.current.init();
|
||||||
authFetch("/api/username", {
|
authFetch("/api/username", {
|
||||||
|
@ -112,13 +109,20 @@ export default function Study() {
|
||||||
receiveRandomPassword();
|
receiveRandomPassword();
|
||||||
setState(STATES.NORMAL);
|
setState(STATES.NORMAL);
|
||||||
handleLoggerOn();
|
handleLoggerOn();
|
||||||
|
// map username and session with the logs
|
||||||
|
_logger.current.logCustomEvent(
|
||||||
|
{
|
||||||
|
name: serverUsername,
|
||||||
|
},
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetInputValues = () => {
|
const resetInputValues = () => {
|
||||||
let inputElements = document.querySelectorAll('div input:not([type="submit"])');
|
let inputElements = document.querySelectorAll(
|
||||||
for (let i=0; i < inputElements.length; i++){
|
'div input:not([type="submit"])'
|
||||||
inputElements[i].value = ""
|
);
|
||||||
|
for (let i = 0; i < inputElements.length; i++) {
|
||||||
|
inputElements[i].value = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue