Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions DESIGN_SWITCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ You can override the configuration by adding a URL parameter:

URL parameters take precedence over the configuration file, making them useful for testing or allowing users to choose their preferred design.

### Shared Result Images

The `useNewDesign` setting also controls the default style of shared result
images. Result images can be explicitly overridden with `?style=modern` or
`?style=classic`.

## Design Locations

### Non-Docker Deployments
Expand Down
5 changes: 4 additions & 1 deletion frontend/javascript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@ function startRenderingLoop() {
window.location.href.lastIndexOf("/")
) +
"/results/?id=" +
testState.testData.testId;
testState.testData.testId +
// Ask for the design this frontend matches; the classic frontend
// links the same URL and gets the classic image without asking.
"&style=modern";
}

testState.testDataDirty = false;
Expand Down
2 changes: 1 addition & 1 deletion index-classic.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
try {
var testId = uiData.testId;
if (testId != null) {
var shareURL = window.location.href.substring(0, window.location.href.lastIndexOf("/")) + "/results/?id=" + testId;
var shareURL = window.location.href.substring(0, window.location.href.lastIndexOf("/")) + "/results/?id=" + testId + "&style=classic";
I("resultsImg").src = shareURL;
I("resultsURL").value = shareURL;
I("testId").innerHTML = testId;
Expand Down
Loading
Loading