Skip to content

Commit

Permalink
copy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
squidgetx committed Dec 17, 2022
1 parent 5a42a44 commit 30a101b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
7 changes: 6 additions & 1 deletion extension/src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { intervalToDuration } from "date-fns";

window.onload = function () {
const setupDebugConsole = function (exp_config) {
if (exp_config.workerID.includes("csmap-tester")) {
document.getElementById("debug").removeAttribute("hidden");
} else {
return;
}
document.getElementById("debug-mode").checked = exp_config.debug_mode;
document.getElementById("debug-mode").addEventListener("change", (ev) => {
chrome.storage.sync.set({ debug_mode: ev.currentTarget.checked });
Expand Down Expand Up @@ -43,7 +48,7 @@ window.onload = function () {

const renderRegisteredPopup = function (exp_config) {
const contentDiv = document.getElementById("content");
contentDiv.innerHTML = `<p>Thank you for participating in this study. Your registration code is <b>${exp_config.install_code}</b>.</p>`;
contentDiv.innerHTML = `<p>Thank you for participating in this study, @${exp_config.workerID}! Your registration code is <b>${exp_config.install_code}</b>.</p>`;
const sinceInstall = intervalToDuration({
start: exp_config.install_time,
end: Date.now(),
Expand Down
12 changes: 9 additions & 3 deletions extension/src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
padding-left: 1em;
margin-top: 0em;
}


</style>
</head>
Expand All @@ -33,7 +34,8 @@ <h1>Timeline Survey Study</h1>
</form>
</div>
<p>Questions? Email csmapsupport@gmail.com with "Timeline Survey Study" in the subject.</p>
<div id='debug'>
<div id='debug' hidden>
<b>Experiment Settings (csmap-tester)</b>
<form>

<input type="checkbox" id="debug-mode"></input>
Expand All @@ -42,17 +44,21 @@ <h1>Timeline Survey Study</h1>

<input type="radio" id="ideo-none" name='ideo' value="0"></input>
<label for="ideo-none">Fetch Ideology From Server (Default)</label>
<br />
<input type="radio" id="ideo-lib" name='ideo' value="-1"></input>
<label for="ideo-lib">Mock Liberal Ideology</label>
<br />
<input type="radio" id="ideo-con" name='ideo' value="1"></input>
<label for="ideo-con">Mock Conservative Ideology</label>

<br />
<br />
<span>Injection Rate:</span>
<input type="range" id="inject-rate" min="0.1" max="1.0" step="0.1">
</input>
<label for="inject-rate">Injection Rate</label>
<br />

<span>Treatment Assignment:</span>
<br />
<input type="radio" id="treat-control" name="treat" value="0"></input>
<label for="treat-control">Control</label>
<input type="radio" id="treat-remove" name='treat' value="1"></input>
Expand Down

0 comments on commit 30a101b

Please sign in to comment.