Skip to content

Commit de871b8

Browse files
committed
feat: use escrow
1 parent c31493e commit de871b8

1 file changed

Lines changed: 83 additions & 49 deletions

File tree

index.html

Lines changed: 83 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,89 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>The placeholder site</title>
7-
<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css" />
8-
<link
9-
rel="stylesheet"
10-
href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@latest/new.min.css"
11-
/>
12-
<script>
13-
document.addEventListener("DOMContentLoaded", function () {
14-
const domain = window.location.hostname || "example.com";
15-
const godaddyLink = document.querySelector('a[href*="godaddy.com"]');
16-
godaddyLink.href = `https://www.godaddy.com/en/domainsearch/find?domainToCheck=${domain}`;
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>The placeholder site</title>
7+
<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css" />
8+
<link
9+
rel="stylesheet"
10+
href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@latest/new.min.css"
11+
/>
12+
<script>
13+
document.addEventListener("DOMContentLoaded", function () {
14+
const domain = window.location.hostname || "example.com";
1715

18-
// GoDaddy seems not to preserve query parameters when redirecting to a localized URL in (some?) mobile
19-
// browsers. This hopefully works around that.
20-
function isMobile() {
21-
return /Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
22-
}
16+
// Populate Escrow.com form with domain
17+
document.getElementById("escrow-domain").value = domain;
18+
document.getElementById("escrow-title").value = domain;
2319

24-
if (isMobile()) {
25-
godaddyLink.addEventListener("click", function (e) {
26-
e.preventDefault();
27-
window.location.href = godaddyLink.href;
28-
});
29-
}
30-
});
31-
</script>
32-
</head>
33-
<body>
34-
<header>
35-
<h1>The placeholder site</h1>
36-
<nav>
37-
<a href="https://github.com/lineofflight/the-placeholder-site"
38-
>GitHub</a
20+
// Fetch price from config.json, default to 1 if not found
21+
fetch("config.json")
22+
.then((response) => response.json())
23+
.then((config) => {
24+
document.getElementById("escrow-price").value =
25+
config.price;
26+
});
27+
28+
// Handle buy link click
29+
const buyLink = document.getElementById("buy-domain");
30+
buyLink.addEventListener("click", function (e) {
31+
e.preventDefault();
32+
document.getElementById("escrow-form").submit();
33+
});
34+
});
35+
</script>
36+
</head>
37+
<body>
38+
<header>
39+
<h1>The placeholder site</h1>
40+
<nav>
41+
<a href="https://github.com/lineofflight/the-placeholder-site"
42+
>GitHub</a
43+
>
44+
</nav>
45+
</header>
46+
<p>This is a placeholder for a future project.</p>
47+
<p>
48+
Have another idea?
49+
<a href="mailto:hi@lineofflig.ht">Get in touch</a> or
50+
<a href="#" id="buy-domain">buy the domain</a>.
51+
</p>
52+
53+
<form
54+
id="escrow-form"
55+
action="https://www.escrow.com/checkout"
56+
method="post"
57+
target="_blank"
58+
style="display: none"
3959
>
40-
</nav>
41-
</header>
42-
<p>This is a placeholder for a future project.</p>
43-
<p>
44-
Have another idea?
45-
<a href="mailto:hi@lineofflig.ht">Get in touch</a> or
46-
<a href="https://www.godaddy.com">buy the domain</a>.
47-
</p>
48-
<a href="https://lineofflig.ht"
49-
><img
50-
src="lineofflight.jpg?v={{ site.time | date: '%s' }}"
51-
alt="Line of Flight"
52-
width="40"
53-
/></a>
54-
</body>
60+
<input type="hidden" name="type" value="domain_name" />
61+
<input
62+
type="hidden"
63+
name="non_initiator_email"
64+
value="company@lineofflig.ht"
65+
/>
66+
<input type="hidden" name="non_initiator_id" value="1364448" />
67+
<input type="hidden" name="non_initiator_role" value="seller" />
68+
<input type="hidden" id="escrow-title" name="title" value="title" />
69+
<input type="hidden" name="currency" value="USD" />
70+
<input type="hidden" id="escrow-domain" name="domain" value="" />
71+
<input type="hidden" id="escrow-price" name="price" value="1" />
72+
<input type="hidden" name="concierge" value="true" />
73+
<input type="hidden" name="with_content" value="false" />
74+
<input type="hidden" name="inspection_period" value="7" />
75+
<input type="hidden" name="fee_payer" value="buyer" />
76+
<input type="hidden" name="return_url" value="" />
77+
<input type="hidden" name="button_types" value="buy_now" />
78+
<input type="hidden" name="auto_accept" value="" />
79+
<input type="hidden" name="auto_reject" value="" />
80+
<input type="hidden" name="item_key" value="undefined" />
81+
</form>
82+
<a href="https://lineofflig.ht"
83+
><img
84+
src="lineofflight.jpg?v={{ site.time | date: '%s' }}"
85+
alt="Line of Flight"
86+
width="40"
87+
/></a>
88+
</body>
5589
</html>

0 commit comments

Comments
 (0)