Compare commits

..

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian fc5a0d209c 0.42.14 2026-01-19 06:05:09 +01:00
DebaucheryLibrarian 63bee8f5e0 Stripping /trial from affiliate URL. 2026-01-19 06:05:07 +01:00
3 changed files with 6 additions and 6 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.42.13",
"version": "0.42.14",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.42.13",
"version": "0.42.14",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@ -87,7 +87,7 @@
"overrides": {
"vite": "$vite"
},
"version": "0.42.13",
"version": "0.42.14",
"imports": {
"#/*": "./*.js"
}

View File

@ -46,13 +46,13 @@ function getAffiliateUrl(scene) {
return watchUrl;
}
if (scene.affiliate.url?.includes('/track')) { // nats redirect
if (scene.affiliate.url?.includes('/track')) { // standard NATS redirect
const { pathname, search } = new URL(watchUrl);
return `${scene.affiliate.url}${pathname}${search}`;
return `${scene.affiliate.url}${pathname.replace(/^\/trial/, '')}${search}`; // replace needed for Jules Jordan, verify behavior on other sites
}
if (scene.affiliate.parameters) { // TODO: this is probably not getting tracked...
if (scene.affiliate.parameters) { // used by e.g. Bang
const newParams = new URLSearchParams({
...Object.fromEntries(new URL(watchUrl).searchParams),
...Object.fromEntries(new URLSearchParams(scene.affiliate.parameters)),