-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdonate.html
More file actions
158 lines (152 loc) · 10.3 KB
/
Copy pathdonate.html
File metadata and controls
158 lines (152 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#6b86ff">
<meta name="referrer" content="no-referrer">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'self'">
<link rel="canonical" href="https://cyphertoshi.com/donate"/>
<meta name="robots" content="index, follow">
<meta name="description" content="Support CypherToshi with Monero, Bitcoin, or Litecoin. Send to the OpenAlias donate@cyphertoshi.com or scan a QR code. Free, open-source, and client-side."/>
<meta name="author" content="Tech1k">
<title>Support | CypherToshi</title>
<link rel="shortcut icon" href="/assets/favicon.png?v=3"/>
<link rel="manifest" href="/site.webmanifest"/>
<link rel="apple-touch-icon" href="/assets/icon.png?v=1"/>
<meta property="og:title" content="Support | CypherToshi"/>
<meta property="og:description" content="Support CypherToshi with Monero, Bitcoin, or Litecoin. Send to the OpenAlias donate@cyphertoshi.com or scan a QR code. Free, open-source, and client-side."/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="https://cyphertoshi.com/assets/og-banner.png?v=1"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta property="og:url" content="https://cyphertoshi.com/donate"/>
<meta property="og:site_name" content="CypherToshi"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://cyphertoshi.com/assets/og-banner.png?v=1"/>
<meta name="twitter:title" content="Support | CypherToshi"/>
<meta name="twitter:description" content="Support CypherToshi with Monero, Bitcoin, or Litecoin. Send to the OpenAlias donate@cyphertoshi.com or scan a QR code."/>
<link rel="alternate" type="application/rss+xml" title="CypherToshi RSS" href="/rss.xml"/>
<link rel="stylesheet" href="/assets/tool.css?v=5">
</head>
<body>
<main id="main">
<h1>Support CypherToshi</h1>
<p>Everything here is free, open-source, and runs entirely in your browser. If the tools and guides are useful to you, a tip helps keep it online. Monero is preferred, but Bitcoin and Litecoin work too. Thank you.</p>
<div style="text-align:center;">
<nav class="sitenav" aria-label="Primary">
<a href="/">Home</a> |
<a href="/about">About</a> |
<a href="/links">Links</a> |
<a href="/notes">Notes</a> |
<a href="/tools">Toolkit</a> |
<a href="/contact">Contact</a>
</nav>
</div>
<hr/>
<section>
<p><strong>OpenAlias:</strong> <code id="alias">donate@cyphertoshi.com</code> <button type="button" class="copy" onclick="copyFrom('alias', this)">Copy</button></p>
<p>Type the alias into any <a href="/posts/openalias-wallets">OpenAlias-aware wallet</a> and it resolves to the matching address below for Monero, Bitcoin, or Litecoin. You can <a href="/openalias-checker?domain=donate%40cyphertoshi.com">verify it yourself</a> first.</p>
</section>
<section>
<h2>Monero (XMR)</h2>
<p><code id="addrXmr" style="word-break: break-word;">89Dz4DkAskRDH6BMnQheh3iVpiRNzjLZA5qq7EPto5zaduDrQ5T3fB9UU1qU6p8acN52QvMLXLa65e6xTTNkiC7fN8FrtQK</code></p>
<p><button type="button" class="copy" onclick="copyFrom('addrXmr', this)">Copy address</button> <a class="copy" href="monero:89Dz4DkAskRDH6BMnQheh3iVpiRNzjLZA5qq7EPto5zaduDrQ5T3fB9UU1qU6p8acN52QvMLXLa65e6xTTNkiC7fN8FrtQK?recipient_name=CypherToshi&tx_description=Donation%20to%20CypherToshi">Open in wallet</a></p>
<div id="qrXmr" class="qr-tile" style="display:inline-block; line-height:0; max-width:200px; overflow-x:auto;"></div>
</section>
<section>
<h2>Bitcoin (BTC)</h2>
<p><code id="addrBtc" style="word-break: break-word;">bc1qs69d78e4wg8h00mq7zmydlcfxytn5nzasjdceq</code></p>
<p><button type="button" class="copy" onclick="copyFrom('addrBtc', this)">Copy address</button> <a class="copy" href="bitcoin:bc1qs69d78e4wg8h00mq7zmydlcfxytn5nzasjdceq?label=CypherToshi&message=Donation%20to%20CypherToshi">Open in wallet</a></p>
<div id="qrBtc" class="qr-tile" style="display:inline-block; line-height:0; max-width:200px; overflow-x:auto;"></div>
</section>
<section>
<h2>Litecoin (LTC)</h2>
<p><code id="addrLtc" style="word-break: break-word;">ltc1qesqzfuwfsdx8t3dmgnh2f79eflhav7qyrs7urn</code></p>
<p><button type="button" class="copy" onclick="copyFrom('addrLtc', this)">Copy address</button> <a class="copy" href="litecoin:ltc1qesqzfuwfsdx8t3dmgnh2f79eflhav7qyrs7urn?label=CypherToshi&message=Donation%20to%20CypherToshi">Open in wallet</a></p>
<div id="qrLtc" class="qr-tile" style="display:inline-block; line-height:0; max-width:200px; overflow-x:auto;"></div>
</section>
<section>
<h2>What your support does</h2>
<p>There are no ads, trackers, or paywalls here, and there never will be. Tips go toward hosting and the time spent building and maintaining everything here. Anything is appreciated, and nothing on this site is ever locked behind a donation.</p>
</section>
<section>
<h2>Other ways to help</h2>
<ul>
<li class="listlink">Share the site, or a specific tool, with someone who would find it useful.</li>
<li class="listlink">Report a bug or suggest a tool on the <a href="/contact">contact page</a>.</li>
<li class="listlink">Read, audit, or improve the code on <a href="https://github.com/Tech1k/cyphertoshi.com" target="_blank" rel="noopener">GitHub</a>.</li>
</ul>
</section>
<hr/>
<footer>
<p style="text-align:center;">An initiative started April 15, 2025 by <a href="https://tech1k.com" target="_blank" rel="noopener">Tech1k</a>.<br/>This site is <a href="https://github.com/Tech1k/cyphertoshi.com" target="_blank" rel="noopener">open-source</a>, with code under <a href="https://github.com/Tech1k/cyphertoshi.com/blob/master/LICENSE" target="_blank" rel="noopener">MIT</a> and words under <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noopener">CC BY 4.0</a>.<br/>You can <a href="/donate">help keep it online</a>.</p>
</footer>
<script src="/assets/qrcode.js"></script>
<script>
const NOTE = encodeURIComponent('Donation to CypherToshi');
const COINS = [
{ box: 'qrXmr', name: 'Monero', logo: '/assets/monero.png?v=2',
uri: 'monero:89Dz4DkAskRDH6BMnQheh3iVpiRNzjLZA5qq7EPto5zaduDrQ5T3fB9UU1qU6p8acN52QvMLXLa65e6xTTNkiC7fN8FrtQK?recipient_name=CypherToshi&tx_description=' + NOTE },
{ box: 'qrBtc', name: 'Bitcoin', logo: '/assets/bitcoin.png?v=2',
uri: 'bitcoin:bc1qs69d78e4wg8h00mq7zmydlcfxytn5nzasjdceq?label=CypherToshi&message=' + NOTE },
{ box: 'qrLtc', name: 'Litecoin', logo: '/assets/litecoin.png?v=2',
uri: 'litecoin:ltc1qesqzfuwfsdx8t3dmgnh2f79eflhav7qyrs7urn?label=CypherToshi&message=' + NOTE }
];
// Render a QR to a <canvas> (CSP-clean: draws modules, no image loading).
function renderQRCanvas(uri, ecc) {
const qr = qrcode(0, ecc || 'M');
qr.addData(uri);
qr.make();
const count = qr.getModuleCount();
const cell = 8, margin = 4;
const size = (count + margin * 2) * cell;
const canvas = document.createElement('canvas');
canvas.width = canvas.height = size;
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#ffffff';
ctx.fillRect(0, 0, size, size);
ctx.fillStyle = '#000000';
for (let r = 0; r < count; r++)
for (let c = 0; c < count; c++)
if (qr.isDark(r, c)) ctx.fillRect((c + margin) * cell, (r + margin) * cell, cell, cell);
canvas.style.maxWidth = '100%';
canvas.style.height = 'auto';
canvas.setAttribute('role', 'img');
canvas.setAttribute('aria-label', 'Payment QR code');
return canvas;
}
// Center the coin logo in the QR. Same-origin image, high error correction.
function drawLogo(canvas, url) {
const img = new Image();
img.onload = function () {
const ctx = canvas.getContext('2d');
const sz = canvas.width;
const logo = Math.round(sz * 0.22);
const pad = Math.round(logo * 0.16);
const box = logo + pad * 2;
const pos = Math.round((sz - box) / 2);
ctx.drawImage(img, pos + pad, pos + pad, logo, logo);
};
img.src = url;
}
function copyFrom(id, btn) {
const text = document.getElementById(id).textContent;
navigator.clipboard.writeText(text).then(function () {
const original = btn.textContent;
btn.textContent = 'Copied!';
setTimeout(function () { btn.textContent = original; }, 1500);
});
}
(function () {
COINS.forEach(function (coin) {
const canvas = renderQRCanvas(coin.uri, 'H');
canvas.setAttribute('aria-label', coin.name + ' payment QR code');
drawLogo(canvas, coin.logo);
document.getElementById(coin.box).appendChild(canvas);
});
})();
</script>
</main>
</body>
</html>