forked from Electron-Cash/electroncash.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
489 lines (448 loc) · 25.7 KB
/
index.html
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<!DOCTYPE html>
<html lang="en" data-bs-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="format-detection" content="telephone=no"> <!--Prevents browsers from trying to make a number a clickable phone number (can still use "tel:" if we want this functionality)-->
<!--Web-App Capable-->
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="EC-Web">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" sizes="192x192" href="favicon/favicon.png">
<link rel="shortcut icon" href="favicon/favicon.ico" />
<link rel="manifest" href="favicon/site.webmanifest" />
<!-- Canonical link for SEO -->
<link href="https://electroncash.org" rel="canonical" data-rh="true">
<link href="https://electroncash.org" hreflang="x-default" rel="alternate" data-rh="true">
<!-- Primary Meta Tags -->
<title>Electron Cash</title>
<meta name="title" content="Electron Cash" >
<meta name="description" content="A Bitcoin Cash (BCH) SPV Wallet">
<!-- Use Google Search Console and Bing Webmaster Tools for SEO data -->
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://electroncash.org">
<meta property="og:title" content="Electron Cash">
<meta property="og:description" content="A Bitcoin Cash (BCH) SPV Wallet">
<meta property="og:image" content="https://electroncash.org/images/EC.png">
<meta property="og:image:alt" content="Electron Cash logo">
<meta property="og:article:section" content="Information">
<meta property="og:article:tag" content="Bitcoin">
<meta property="og:article:tag" content="Bitcoin Cash">
<meta property="og:article:tag" content="BCH">
<meta property="og:article:tag" content="Cryptocurrencies">
<meta property="og:article:tag" content="Wallet">
<meta property="og:article:tag" content="Ecosystem">
<!-- Twitter -->
<meta property="twitter:card" content="summary">
<meta property="twitter:url" content="https://electroncash.org">
<meta name="twitter:site" content="@electroncash">
<meta name="twitter:creator" content="@electroncash">
<meta property="twitter:title" content="Electron Cash">
<meta property="twitter:description" content="A Bitcoin Cash (BCH) SPV Wallet">
<meta property="twitter:image" content="https://electroncash.org/images/ec-logo-7.png">
<meta name="keywords" content="Bitcoin, Bitcoin Cash, BTC, BCH, Satoshi, Bcash, crypto, electron cash, digital currency, wallet, DeFi, altcoin">
<meta name="robots" content="index, follow">
<meta name="language" content="English">
<meta name="revisit-after" content="7 days">
<meta name="author" content="Electron Cash">
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="/favicon/favicon.ico">
<link rel="icon" type="image/png" href="/favicon/favicon.png">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet" type="text/css" media="all">
<!-- CSS -->
<link rel="stylesheet" href="css/main.css?v=0.01">
<!-- Bootstrap 5.3.3 -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
<!-- Schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Electron Cash",
"alternateName": "Electron Cash",
"url": "https://electroncash.org",
"logo": "https://electroncash.org/images/ec-logo-7.png",
"sameAs": [
"https://x.com/electroncash",
"https://github.com/Electron-Cash/electroncash.org"
]
}
</script>
</head>
<body data-bs-spy="scroll" data-bs-target="#navId" data-bs-smooth-scroll="true" data-bs-root-margin="0px 0px -80%" tabindex="0">
<div class="container-fluid">
<div class="alert alert-danger d-flex align-items-center justify-content-center my-2 py-2" role="alert">
<svg xmlns="http://www.w3.org/2000/svg" class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16" role="img" aria-label="Danger:">
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
</svg>
<div class="pe-3">
<span class="fw-bold">Beware of imposter sites.</span> ElectronCash.ORG is the ONLY official site for this wallet.
</div>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
<!--Navbar-->
<nav class="navbar navbar-expand-lg bg-primary sticky-top" id="navId" data-bs-theme="dark">
<div class="container">
<a class="navbar-brand" href="/">Electron Cash</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav navbar-nav ms-auto">
<a class="nav-link" href="#_home">Home</a>
<a class="nav-link" href="#_benefits">Benefits</a>
<a class="nav-link" href="#_spv">SPV</a>
<a class="nav-link" href="#_download">Download</a>
<a class="nav-link" href="#_FAQ">FAQ</a>
<a class="nav-link" href="ecosystem.html">Ecosystem</a>
</div>
</div>
</div>
</nav>
<!-- Floating Theme Button -->
<div class="theme p-2">
<div class="dropdown theme-switcher">
<button class="btn btn-secondary dropdown-toggle" type="button" id="themeDropdown" data-bs-toggle="dropdown" aria-expanded="false">
<i id="themeIcon" class="bi bi-moon-stars-fill"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="themeDropdown">
<li><a class="dropdown-item" href="#" data-theme="light"><i class="bi bi-brightness-high-fill"></i> Light</a></li>
<li><a class="dropdown-item" href="#" data-theme="dark"><i class="bi bi-moon-fill"></i> Dark</a></li>
</ul>
</div>
</div>
<!--Page header-->
<div class="container pt-5 text-center" id="_home">
<div class="row py-5">
<div class=".col-md-2 .offset-md-5 d-inline-flex align-items-center justify-content-center">
<img class="img-fluid" style="max-height:200px" src="images/ec-logo-7.png">
</div>
</div>
<div class="row pt-4">
<div class="col">
<h1 class="fw-normal text-light-emphasis">A Bitcoin Cash SPV Wallet</h1>
</div>
</div>
<div class="row py-4">
<div class=".col-sm">
<h4 class="text-dark-emphasis fw-normal lh-base text-break">Control your own private keys. Easily back up your wallet with a mnemonic seed phrase. Enjoy high security without downloading the blockchain or running a full node.</h4>
</div>
</div>
<div class="row align-items-center justify-content-center">
<div class="col-xxl-4 text-center">
<div class="d-grid gap-2 mx-auto">
<a href="#_download">
<button type="button" class="btn btn-primary btn-lg text-uppercase" style="font-size:1em"><i class="bi bi-download"></i> Download latest version 4.4.2</button>
</a>
</div>
</div>
</div>
<div class="row pt-4">
<div class=".col-sm">
<h6 class="text-dark-emphasis fw-normal text-break">Electron Cash now supports <a target="new" href="https://cashtokens.org">CashTokens</a>.</h6>
</div>
</div>
</div>
<!--Demo Screen-->
<div class="container">
<div class="row">
<div class="col d-inline-flex align-items-center justify-content-center">
<img class="img-fluid" style="max-height:700px" src="images/wallet-shot-3.png?v=0.01">
</div>
</div>
</div>
<!--Benefits-->
<div class="container pt-5" id="_benefits">
<div class="row py-3 text-center">
<h2 class="fs-1 text-light-emphasis">Benefits</h2>
</div>
<div class="row py-3">
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-safe-fill"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Safe</h4>
<p class="card-text fs-5 text-dark-emphasis">Your private keys are encrypted and never leave your computer.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-clipboard-heart-fill"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Forgiving</h4>
<p class="card-text fs-5 text-dark-emphasis">Your funds can be recovered from a secret phrase.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-stopwatch-fill"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Instant On</h4>
<p class="card-text fs-5 text-dark-emphasis">Electron Cash is fast, because it uses servers that index the Bitcoin Cash blockchain.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-box-arrow-right"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">No Lock-In</h4>
<p class="card-text fs-5 text-dark-emphasis">You can export your private keys and use them in other Bitcoin Cash clients.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-lightning-fill"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">No Downtimes</h4>
<p class="card-text fs-5 text-dark-emphasis">Electron Cash servers are decentralized and redundant. Your wallet is never down.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-shield-shaded"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Proof Checking</h4>
<p class="card-text fs-5 text-dark-emphasis">Electron Cash verifies all the transactions in your history using SPV.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-snow"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Cold Storage</h4>
<p class="card-text fs-5 text-dark-emphasis">Keep your private keys offline, and go online with a watching-only wallet.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="custom-icon-bi text-light-emphasis"><i class="bi bi-diagram-3-fill"></i></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Multisig</h4>
<p class="card-text fs-5 text-dark-emphasis">Split the permission to spend your coins between several wallets.</p>
</div>
</div>
</div>
<div class="col-lg-3 offset-lg-3">
<div class="card border-0 text-center">
<p class="fs-1"><img src="images/CashFusionIcon_Gray.svg" alt="Logo for CashFusion" class="custom-icon" id="img1"></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">Privacy</h4>
<p class="card-text fs-5 text-dark-emphasis">Add privacy with CashFusion coinjoins and receive funds with stealth (RPA) addresses.</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card border-0 text-center">
<p class="fs-1"><img src="images/CashTokens_Gray.svg" alt="Logo for CashTokens" class="custom-icon" id="img2"></p>
<div class="card-body">
<h4 class="card-title text-light-emphasis">CashTokens</h4>
<p class="card-text fs-5 text-dark-emphasis">Use CashTokens, the built-in token system for the Bitcoin Cash network.</p>
</div>
</div>
</div>
</div>
</div>
<!--SPV-->
<div class="container pt-5" id="_spv">
<div class="card text-bg-primary text-center p-5">
<div class="card-body">
<h5 class="card-title fs-1">What is SPV?</h5>
<br>
<p class="card-text fs-5">SPV stands for Simplified Payment Verification. It was first described by Satoshi Nakamoto in the original Bitcoin whitepaper. This method allows a wallet to provide strong security without the need for downloading the blockchain or running a full node. SPV lets you validate your own transactions by ensuring they are confirmed in the blockchain. It uses the best header chain with the most cumulative proof of work and the correct hashing difficulty level. Electron Cash relies on a distributed network of servers which handle the heaviest part of blockchain operations. Your private keys sign transactions locally. They are never sent to the servers.</p>
</div>
</div>
</div>
<!--Download-->
<div class="container pt-5" id="_download">
<div class="row py-3 text-center">
<h2 class="fs-1 text-light-emphasis">Download</h2>
<h6 class="text-dark-emphasis">This software is provided free of charge in hopes that it will be useful, but without any warranty of merchantability, under the terms of the <a class="light-link" href="https://mit-license.org">MIT License</a>.</h6>
</div>
<div class="row py-3">
<div class="col-lg-2 offset-lg-1">
<div class="card border-0 text-center text-light-emphasis">
<p class="custom-icon-bi"><i class="bi bi-microsoft"></i></p>
<div class="card-body">
<h4 class="card-title">Microsoft</h4>
<p class="card-text fs-6 fw-medium mb-1"><a class="link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/Electron-Cash-4.4.2.exe">4.4.2 EXE</a></p>
<p class="card-text fs-6 mb-1"><a class="link-warning link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/Electron-Cash-4.4.2-portable.exe">Portable</a></p>
<p class="card-text fs-6 mb-1"><a class="link-warning link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/Electron-Cash-4.4.2-setup.exe">Installable</a></p>
<p class="card-text fs-6 mb-1"><a class="link-warning link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/electron_cash-4.4.2.zip">Source Code</a></p>
</div>
</div>
</div>
<div class="col-lg-2">
<div class="card border-0 text-center text-light-emphasis">
<p class="custom-icon-bi"><i class="bi bi-apple"></i></p>
<div class="card-body">
<h4 class="card-title">Apple</h4>
<p class="card-text fs-6 fw-medium mb-1"><a class="link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/mac/Electron-Cash-4.4.2-macosx.dmg">macOS DMG</a></p>
<p class="card-text fs-6 mb-1"><a class="link-warning link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/electron_cash-4.4.2.tar.gz">Source Code</a></p>
</div>
</div>
</div>
<div class="col-lg-2">
<div class="card border-0 text-center text-light-emphasis">
<p class="custom-icon-bi"><i class="bi bi-ubuntu"></i></p>
<div class="card-body">
<h4 class="card-title">Linux</h4>
<p class="card-text fs-6 fw-medium mb-1"><a class="link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/Electron-Cash-4.4.2-x86_64.AppImage">App Image</a></p>
<p class="card-text fs-6 mb-1"><a class="link-warning link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.2/win-linux/electron_cash-4.4.2.tar.gz">Source Code</a></p>
</div>
</div>
</div>
<div class="col-lg-2">
<div class="card border-0 text-center text-light-emphasis">
<p class="custom-icon-bi"><i class="bi bi-android2"></i></p>
<div class="card-body">
<h4 class="card-title">Android</h4>
<a href="https://play.google.com/store/apps/details?id=org.electroncash.wallet"><img width="150px" src="images/google-play-badge.png"></a>
<p class="card-text fs-6 mb-1"><a class="link-warning link-underline link-underline-opacity-0" href="https://electroncash.org/downloads/4.4.1/android/electroncash-4.4.1-3.apk">APK File</a></p>
</div>
</div>
</div>
<div class="col-lg-2">
<div class="card border-0 text-center text-light-emphasis">
<p class="custom-icon-bi"><i class="bi bi-app-indicator"></i></p>
<div class="card-body">
<h4 class="card-title">iOS</h4>
<a href="https://apps.apple.com/us/app/electron-cash/id1359700089"><img width="150px" src="images/appstore.svg"></a>
</div>
</div>
</div>
</div>
<div class="row py-3 text-center text-dark-emphasis">
<div class="col-lg-10 offset-lg-1">
<h6 class="fw-normal">Note for Windows users: <u>Most users should download the EXE.</u> Anti-virus programs occasionally flag the wallet with false positives. If you trust the developers, then the software is safe once you verify the GPG signatures and/or checksums. Or, you can build the binaries yourself.</h6>
<br><br>
<h6 class="fw-normal">.AppImage is for any Linux 64 bit (it's a self-contained app bundle with everything inside). Note: Be sure to set this to executable to run it (chmod +x)</h6>
<br><br>
</div>
<div class="alert alert-warning" role="alert">
Please take the time to verify the authenticity of these files before running them. This protects you from hackers and malware!
</div>
<h6>You can find signatures, checksum hashes, and instructions <a class="light-link" href="https://github.com/Electron-Cash/keys-n-hashes">here</a>.</h6>
</div>
<hr class="border border-emphasis border-1 opacity-100">
</div>
<!--FAQ-->
<div class="container pt-5" id="_FAQ">
<div class="row text-center">
<h2 class="fs-1 text-light-emphasis py-3">FAQ</h2>
<h2 class="fs-2 pb-5 text-dark-emphasis">What if I need support?</h2>
<p class="mb-3 text-dark-emphasis">Please visit us on <a class="light-link" href="https://github.com/Electron-Cash/Electron-Cash/issues">GitHub</a> or on <a class="light-link" href="https://t.me/electroncashwallet">Telegram</a>.</p>
<p class="mb-3 text-dark-emphasis">Also have a look at our <a class="light-link" href="https://www.youtube.com/playlist?list=PL6P_87NPp72aMQeOiSO4Pq8u_yeOcY6K7">video tutorials on YouTube</a>.</p>
<h2 class="fs-2 py-5 text-dark-emphasis">Looking for an older version?</h2>
<p class="mb-3 text-dark-emphasis">Outdated software versions may be incompatible with the network or insecure, leading to loss of funds. You should only run an outdated version if absolutely necessary or for research purposes. To proceed with caution, click <a class="light-link" href="https://electroncash.org/downloads">here</a>.</p>
</div>
<hr class="border border-emphasis border-1 opacity-100">
</div>
<div class="container pt-5">
<div class="row py-3 text-center text-light-emphasis">
<h2 class="fs-1 my-3">The Revolution Will Not Be Centralized</h2>
<img class="img-fluid" id="bch_logo" style="max-height:100px" src="images/bchLogoFullDark.svg">
</div>
<hr class="border border-emphasis border-1 opacity-100">
</div>
<div class="container">
<div class="py-5 mb-4">
<center><a href="https://satochip.io/shop/wallet/13/?campaign=ElectronCash"><img style="max-width:100%;" src="images/Satochip_banner.gif"></a></center>
</div>
</div>
<footer class="bg-primary text-center py-4" data-bs-theme="dark">
<div class="row">
<h6 class="text-light-emphasis"><a class="link-light" href="https://discover.cash">Learn about Bitcoin Cash</a> | <a class="link-light" href="https://github.com/Electron-Cash/Electron-Cash">Explore Source Code</a> | <a class="link-light" href="http://www.reddit.com/r/btc">Uncensored Bitcoin Forum</a> | <a class="link-light" href="https://t.me/electroncashwallet">Telegram Chatroom</a> | <a class="link-light" href="https://cashaddress.org">Paper Wallet</a>
</h6>
<h6 class="text-light-emphasis mt-3">© ElectronCash.org</h6>
</div>
</footer>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<!-- Jquery needed -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
function setTheme(theme) {
document.documentElement.setAttribute('data-bs-theme', theme);
localStorage.setItem('bs-theme', theme);
updateThemeIcon(theme);
updateActiveDropdownItem(theme);
updateButtonStyles(); // Call this function to update button styles on theme change
}
function getCurrentTheme() {
return localStorage.getItem('bs-theme') || 'dark';
}
function updateThemeIcon(theme) {
const icon = document.getElementById('themeIcon');
icon.className = `bi ${theme === 'light' ? 'bi-brightness-high-fill' : 'bi-moon-stars-fill'}`;
}
function updateActiveDropdownItem(theme) {
document.querySelectorAll('.theme-switcher .dropdown-item').forEach(item => {
item.classList.toggle('active', item.getAttribute('data-theme') === theme);
});
}
function updateButtonStyles() {
document.querySelectorAll('.btn-outline-secondary, .btn-secondary').forEach(button => {
const currentTheme = document.documentElement.getAttribute('data-bs-theme');
if (currentTheme === 'dark') {
button.classList.remove('btn-outline-secondary');
button.classList.add('btn-secondary');
} else {
button.classList.remove('btn-secondary');
button.classList.add('btn-outline-secondary');
}
});
}
setTheme(getCurrentTheme());
updateButtonStyles(); // Initial call to ensure buttons are styled correctly on load
document.querySelectorAll('.theme-switcher .dropdown-item').forEach(item => {
item.addEventListener('click', function(e) {
e.preventDefault();
const theme = this.getAttribute('data-theme');
setTheme(theme);
});
});
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Function to swap images
function swapImage() {
const img1 = document.getElementById('img1')
const img2 = document.getElementById('img2')
const img3 = document.getElementById('bch_logo')
const theme = document.documentElement.getAttribute('data-bs-theme');
if (theme === 'dark') {
img1.src = 'images/CashFusionIcon_GrayDark.svg?v=0.01';
img2.src = 'images/CashTokens_GrayDark.svg?v=0.01';
img3.src = 'images/bchLogoFullWhite.svg?v=0.01';
} else {
img1.src = 'images/CashFusionIcon_Gray.svg?v=0.01';
img2.src = 'images/CashTokens_Gray.svg?v=0.01';
img3.src = 'images/bchLogoFullDark.svg?v=0.01';
}
}
// Initial check
swapImage();
// Listen for theme changes
const observer = new MutationObserver(swapImage);
observer.observe(document.documentElement, {
attributes: true,
attributeFilter: ['data-bs-theme']
});
});
</script>
</body>
</html>