From 3f4b7b728e40a7d52738ba07c4136b5fe04077a4 Mon Sep 17 00:00:00 2001 From: Lori Pickering Date: Sat, 5 Jul 2025 16:01:43 -0400 Subject: [PATCH 1/2] Test start study from hosted page. --- pages/hosting/start_study.html | 153 +++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 pages/hosting/start_study.html diff --git a/pages/hosting/start_study.html b/pages/hosting/start_study.html new file mode 100644 index 0000000..7d82361 --- /dev/null +++ b/pages/hosting/start_study.html @@ -0,0 +1,153 @@ + + + + + + Start Research Study + + + + + +
+
+

Fake Profile Detection Study

+ +
+

Before You Begin

+

+ This study will open in a new browser window. +

+

+ The browser's back button will be disabled during the study to ensure tasks are completed in the correct order. You will need to use the study's navigation buttons to move between tasks. +

+

+ Please complete all tasks in one session. Do not close the new window until you see the completion confirmation. +

+
+ + + + +
+
+
+ + + + \ No newline at end of file From b7091ec09bc6474263501aef594690eece2fd6f5 Mon Sep 17 00:00:00 2001 From: Lori Pickering Date: Sat, 5 Jul 2025 16:16:59 -0400 Subject: [PATCH 2/2] Start on start_study.html to ensure participants opens app in new browser window, effectively disabling the browser's Back button. --- pages/hosting/consent.html | 11 +++++++++++ pages/hosting/start_study.html | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pages/hosting/consent.html b/pages/hosting/consent.html index 94d71cf..2c2f006 100644 --- a/pages/hosting/consent.html +++ b/pages/hosting/consent.html @@ -205,6 +205,17 @@

Electronic Consent

} */ function initializePage() { try { + + // Check if this was launched properly from start_study.html + const urlParams = new URLSearchParams(window.location.search); + const wasLaunched = urlParams.get('launched') === 'true'; + + if (!wasLaunched) { + // Redirect to start page if not launched properly + window.location.replace('./start_study.html'); + return; + } + // Check for mobile device FIRST const deviceInfo = DeviceDetector.getDeviceInfo(); diff --git a/pages/hosting/start_study.html b/pages/hosting/start_study.html index 7d82361..86d27da 100644 --- a/pages/hosting/start_study.html +++ b/pages/hosting/start_study.html @@ -57,7 +57,7 @@

Before You Begin

try { // First, try to open in a new tab (more likely to succeed) const studyWindow = window.open( - './consent.html', // Explicit relative path to consent.html in same directory --> + './consent.html?launched=true', // Add parameter to indicate proper launch '_blank' ); @@ -90,7 +90,7 @@

Before You Begin

Alternative Method:

1. Allow popups for this site in your browser settings

2. Or right-click this link and select "Open in new tab":

-

Open Study in New Tab

+

Open Study in New Tab

`; const messageContainer = document.getElementById('message-container'); @@ -108,7 +108,7 @@

Alternative Method:

linkContainer.innerHTML = `

Unable to open automatically

Please click the link below to start the study:

-

Open Study in New Tab

+

Open Study in New Tab

`; const messageContainer = document.getElementById('message-container');