We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34b1a35 commit f505e8eCopy full SHA for f505e8e
src/components/addUtmParameters.ejs
@@ -8,17 +8,12 @@ _%>
8
9
<script>
10
for(const anchor of document.querySelectorAll("a")) {
11
- if (anchor.getAttribute("href").startsWith("#")) {
+ const hrefAttr = anchor.getAttribute("href");
12
+ if (!hrefAttr.startsWith("http://") && !hrefAttr.startsWith("https://")) {
13
continue;
14
}
15
try {
16
const url = new URL(anchor.href);
- if (!url.protocol.startsWith("http")) {
17
- continue;
18
- }
19
- if (url.hostname === "127.0.0.1") {
20
21
22
const params = new Map();
23
if (url.hostname.endsWith("sketchy.com")) {
24
params.set("utm_medium", "partnership");
0 commit comments