mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Merge pull request #2530 from fabian-hiller/master
Upgrade Netlify plugin and add strip search config
This commit is contained in:
commit
19cfe47ac4
@ -14,10 +14,12 @@
|
|||||||
|
|
||||||
const _data = 'data-';
|
const _data = 'data-';
|
||||||
const _false = 'false';
|
const _false = 'false';
|
||||||
|
const _true = 'true';
|
||||||
const attr = currentScript.getAttribute.bind(currentScript);
|
const attr = currentScript.getAttribute.bind(currentScript);
|
||||||
const website = attr(_data + 'website-id');
|
const website = attr(_data + 'website-id');
|
||||||
const hostUrl = attr(_data + 'host-url');
|
const hostUrl = attr(_data + 'host-url');
|
||||||
const autoTrack = attr(_data + 'auto-track') !== _false;
|
const autoTrack = attr(_data + 'auto-track') !== _false;
|
||||||
|
const stripSearch = attr(_data + 'strip-search') === _true;
|
||||||
const domain = attr(_data + 'domains') || '';
|
const domain = attr(_data + 'domains') || '';
|
||||||
const domains = domain.split(',').map(n => n.trim());
|
const domains = domain.split(',').map(n => n.trim());
|
||||||
const root = hostUrl
|
const root = hostUrl
|
||||||
@ -221,7 +223,7 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentUrl = `${pathname}${search}`;
|
let currentUrl = `${pathname}${stripSearch ? '' : search}`;
|
||||||
let currentRef = document.referrer;
|
let currentRef = document.referrer;
|
||||||
let title = document.title;
|
let title = document.title;
|
||||||
let cache;
|
let cache;
|
||||||
|
17
yarn.lock
17
yarn.lock
@ -2143,12 +2143,11 @@
|
|||||||
is-promise "^4.0.0"
|
is-promise "^4.0.0"
|
||||||
|
|
||||||
"@netlify/functions@^2.4.0":
|
"@netlify/functions@^2.4.0":
|
||||||
version "2.4.1"
|
version "2.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-2.4.1.tgz#93bc87313474285993b4de7cde6335ada0665870"
|
resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-2.6.0.tgz#801a6fe8ceef2ce1512c637a28e53e6a3aae289b"
|
||||||
integrity sha512-sRFYBaz6dJP1MdUtk/5QNmshhg5UDmB+DUssmH6v9WUG85MrwyExEfGfJA5eClXATjXm0coTvO5nLAlyCpK7QQ==
|
integrity sha512-vU20tij0fb4nRGACqb+5SQvKd50JYyTyEhQetCMHdakcJFzjLDivvRR16u1G2Oy4A7xNAtGJF1uz8reeOtTVcQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@netlify/serverless-functions-api" "1.12.3"
|
"@netlify/serverless-functions-api" "1.14.0"
|
||||||
is-promise "^4.0.0"
|
|
||||||
|
|
||||||
"@netlify/ipx@^1.4.6":
|
"@netlify/ipx@^1.4.6":
|
||||||
version "1.4.6"
|
version "1.4.6"
|
||||||
@ -2201,10 +2200,10 @@
|
|||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
tiny-glob "^0.2.9"
|
tiny-glob "^0.2.9"
|
||||||
|
|
||||||
"@netlify/serverless-functions-api@1.12.3":
|
"@netlify/serverless-functions-api@1.14.0":
|
||||||
version "1.12.3"
|
version "1.14.0"
|
||||||
resolved "https://registry.yarnpkg.com/@netlify/serverless-functions-api/-/serverless-functions-api-1.12.3.tgz#cf1abc7ca2c9d3f920fea458c44bdda4d3e614e4"
|
resolved "https://registry.yarnpkg.com/@netlify/serverless-functions-api/-/serverless-functions-api-1.14.0.tgz#2bedff76cf898e24e48161aa2508776c4d261ed1"
|
||||||
integrity sha512-g1AZ78pCvMnalZtbnViVLGfG5ufjKyKoi3plLSUtZqh0wVuMR7ZGegeZHhOoY4wRfkkETVvWfhgfcpLMbGM5Lg==
|
integrity sha512-HUNETLNvNiC2J+SB/YuRwJA9+agPrc0azSoWVk8H85GC+YE114hcS5JW+dstpKwVerp2xILE3vNWN7IMXP5Q5Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@netlify/node-cookies" "^0.1.0"
|
"@netlify/node-cookies" "^0.1.0"
|
||||||
urlpattern-polyfill "8.0.2"
|
urlpattern-polyfill "8.0.2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user