Hanes.com comes up blank.

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
DoctorM
Fanatic
Fanatic
Posts: 150
Joined: 2014-07-31, 18:19
Location: USA

Hanes.com comes up blank.

Post by DoctorM » 2025-10-05, 02:37

Hanes.com comes up as a blank page.

Code: Select all

SyntaxError: await is a reserved identifier  
scripts.js:35:24
SyntaxError: await is a reserved identifier  
commerce.js:11:4

User avatar
adoxa
Astronaut
Astronaut
Posts: 521
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: Hanes.com comes up blank.

Post by adoxa » 2025-10-05, 07:38

It uses the currently-unsupported top-level await. I managed to work-around three, but then I got blocked ("AI Threats Detection"? maybe too many quick refreshes?). There was a fourth one that shouldn't have occurred (async arrow function), but I didn't get to try with the third to see if that's what caused it. I'll post the Modify HTTP Response filter so far, anyway.

Code: Select all

[["www.hanes.com",["/scripts/scripts.js",["const { faviconPath } = await getStoreConfiguration();","let faviconPath; getStoreConfiguration().then(c => faviconPath = c.faviconPath);"]],["/scripts/commerce.js",["const {\n  domainName, websiteStoreViewCode, imgBaseDomain, cdn,\n} = await getStoreConfiguration();","let domainName, websiteStoreViewCode, imgBaseDomain, cdn; await getStoreConfiguration().then(c => ({domainName, websiteStoreViewCode, imgBaseDomain, cdn} = c));"]],["/scripts/delayed.js",["const launchurl = await getConfigValue('launch-script');","let launchurl; getConfigValue('launch-script').then(v => launchurl = v);"]]]]