forked from LedgerHQ/ledger-live
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathledger-live-mobile-deeplinks.html
More file actions
769 lines (701 loc) · 29.2 KB
/
Copy pathledger-live-mobile-deeplinks.html
File metadata and controls
769 lines (701 loc) · 29.2 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
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
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="pageTitle">Ledger Live Mobile DeepLinks</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #ffffff;
background: #000000;
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: #000000;
border-radius: 12px;
box-shadow: 0 20px 40px rgba(255, 255, 255, 0.1);
overflow: hidden;
border: 1px solid #333333;
}
.header {
background: #000000;
color: white;
padding: 40px;
text-align: center;
border-bottom: 1px solid #333333;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
font-weight: 700;
}
.header p {
font-size: 1.1rem;
opacity: 0.9;
}
.content {
padding: 40px;
background: #000000;
}
.section {
margin-bottom: 40px;
background: #111111;
border-radius: 12px;
padding: 30px;
border-left: 4px solid #ff6b35;
border: 1px solid #333333;
}
.section h2 {
color: #ffffff;
font-size: 1.5rem;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
}
.section h2::before {
content: "🔗";
font-size: 1.2rem;
}
.deeplink-item {
background: #1a1a1a;
border: 1px solid #333333;
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
transition: all 0.3s ease;
}
.deeplink-item:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
border-color: #ff6b35;
}
.deeplink-title {
font-weight: 700;
color: #ffffff;
margin-bottom: 12px;
font-size: 1.2rem;
}
.deeplink-url {
background: #222222;
padding: 12px;
border-radius: 8px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.95rem;
color: #ff6b35;
margin-bottom: 12px;
word-break: break-all;
border: 1px solid #444444;
}
.deeplink-description {
color: #cccccc;
font-size: 0.95rem;
margin-bottom: 15px;
background: #1a1a1a;
padding: 15px;
border-radius: 8px;
border: 1px solid #333333;
line-height: 1.5;
}
.deeplink-input {
background: #222222;
border: 1px solid #444444;
border-radius: 4px;
padding: 8px 12px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.9rem;
color: #ffffff;
width: 100%;
margin-bottom: 10px;
}
.deeplink-input:focus {
outline: none;
border-color: #ff6b35;
box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}
.deeplink-input::placeholder {
color: #666666;
}
.deeplink-examples {
margin-top: 10px;
}
.deeplink-examples h4 {
color: #ffffff;
font-size: 0.9rem;
margin-bottom: 8px;
font-weight: 600;
}
.example-list {
list-style: none;
padding-left: 0;
}
.example-list li {
background: #333333;
padding: 8px 12px;
border-radius: 4px;
margin-bottom: 5px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.85rem;
color: #ff6b35;
border: 1px solid #444444;
cursor: pointer;
transition: all 0.2s ease;
}
.example-list li:hover {
background: #444444;
border-color: #ff6b35;
transform: translateY(-1px);
}
.clickable-link {
display: inline-block;
background: #ff6b35;
color: white;
padding: 12px 20px;
border-radius: 8px;
text-decoration: none;
font-weight: 600;
font-size: 0.95rem;
transition: all 0.3s ease;
margin-top: 15px;
}
.clickable-link:hover {
background: #e55a2b;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}
.parameters {
background: #fff3cd;
border: 1px solid #ffeaa7;
border-radius: 4px;
padding: 10px;
margin-top: 10px;
}
.parameters h4 {
color: #856404;
font-size: 0.9rem;
margin-bottom: 5px;
font-weight: 600;
}
.parameter-list {
list-style: none;
padding-left: 0;
}
.parameter-list li {
color: #856404;
font-size: 0.85rem;
margin-bottom: 3px;
}
.warning {
background: #8b5cf6;
border: 1px solid #a78bfa;
border-radius: 8px;
padding: 15px;
margin: 20px 0;
color: #ffffff;
}
.warning strong {
display: block;
margin-bottom: 5px;
}
.platform-note {
background: #8b5cf6;
border: 1px solid #a78bfa;
border-radius: 8px;
padding: 15px;
margin: 20px 0;
color: #ffffff;
}
.platform-note strong {
display: block;
margin-bottom: 5px;
}
.platform-note a {
color: #ff6b35;
text-decoration: none;
}
.platform-note a:hover {
text-decoration: underline;
}
.footer {
background: #111111;
padding: 20px 40px;
text-align: center;
color: #cccccc;
border-top: 1px solid #333333;
}
.footer a {
color: #ff6b35;
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
color: #e55a2b;
}
.footer code {
background: #222222;
color: #ff6b35;
padding: 8px 12px;
border-radius: 6px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
border: 1px solid #444444;
display: block;
margin: 8px 0;
white-space: pre-wrap;
word-break: break-all;
line-height: 1.4;
}
.footer .test-section {
margin: 20px 0;
text-align: left;
}
.footer .test-section h4 {
color: #ff6b35;
margin-bottom: 8px;
font-size: 1rem;
}
.footer .test-command {
background: #222222;
color: #ff6b35;
padding: 12px 16px;
border-radius: 6px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
border: 1px solid #444444;
display: block;
margin: 8px 0;
white-space: pre-wrap;
word-break: break-all;
line-height: 1.5;
font-size: 0.9rem;
}
@media (max-width: 768px) {
.header {
padding: 20px;
}
.header h1 {
font-size: 2rem;
}
.content {
padding: 20px;
}
.deeplink-url {
font-size: 0.8rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1 id="mainTitle">Ledger Live Mobile DeepLinks</h1>
<p id="mainDescription">Complete reference of all available deeplinks for Ledger Live Mobile</p>
</div>
<div class="content" id="content">
<!-- Content will be dynamically generated -->
</div>
<div class="footer">
<p id="footerText">Based on the <a href="https://github.com/LedgerHQ/ledger-live/wiki/LLM:DeepLinking" target="_blank">Ledger Live Mobile DeepLinking Documentation</a></p>
<div class="test-section">
<h4>For testing on Android:</h4>
<div class="test-command">adb shell am start -W -a android.intent.action.VIEW -d "ledgerlive://{{YOUR_URL}}" com.ledger.live.debug</div>
</div>
<div class="test-section">
<h4>For testing on iOS:</h4>
<div class="test-command">xcrun simctl openurl booted ledgerlive://{{YOUR_URL}}</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Configuration for Mobile application
const appConfig = {
title: "Ledger Live Mobile DeepLinks",
description: "Complete reference of all available deeplinks for Ledger Live Mobile",
scheme: "ledgerwallet://",
footerText: "Based on the <a href='https://github.com/LedgerHQ/ledger-live/wiki/LLM:DeepLinking' target='_blank'>Ledger Live Mobile DeepLinking Documentation</a>",
platformNote: {
title: "📱 Mobile Note:",
content: "Mobile deeplinks may behave differently on iOS and Android. Some features might be platform-specific."
},
deeplinks: [
{
section: "Portfolio",
title: "Portfolio Page (default landing)",
url: "ledgerwallet://",
description: "Opens the portfolio page, which is the default landing page.",
examples: ["ledgerwallet://", "ledgerwallet://portfolio", "ledgerlive://", "ledgerlive://portfolio"]
},
{
section: "Accounts",
title: "Accounts and Account Page",
url: "ledgerwallet://accounts",
description: "Opens the accounts page or a specific account based on parameters.",
parameters: [
{ name: "currency", required: false, description: "The ticker or name of the currency" },
{ name: "address", required: false, description: "Specific account address" }
],
examples: [
"ledgerwallet://accounts",
"ledgerwallet://accounts?currency=btc",
"ledgerwallet://accounts?currency=ethereum&address=0x123...",
"ledgerlive://accounts",
"ledgerlive://accounts?currency=btc",
"ledgerlive://accounts?currency=ethereum&address=0x123..."
]
},
{
section: "Asset",
title: "Asset Page",
url: "ledgerlive://asset/:currencyId",
description: "Opens the asset page for a specific currency. When the Wallet 4.0 `aggregatedAssets` param is enabled, opens the Asset Detail screen with source = \"deeplink_asset\"; otherwise opens the legacy WalletCentricAsset screen. Invalid or missing currencyId falls back to portfolio.",
parameters: [
{ name: "currencyId", required: true, description: "The currency ID (e.g., bitcoin, ethereum)" }
],
examples: [
"ledgerwallet://asset/bitcoin",
"ledgerwallet://asset/ethereum",
"ledgerlive://asset/bitcoin",
"ledgerlive://asset/ethereum"
]
},
{
section: "Add Account",
title: "Add Account Modal",
url: "ledgerwallet://add-account",
description: "Opens the Add Account Modal with optional currency pre-selection.",
parameters: [
{ name: "currency", required: false, description: "The ticker or name of the currency to pre-fill" }
],
examples: ["ledgerwallet://add-account", "ledgerwallet://add-account?currency=bitcoin", "ledgerlive://add-account", "ledgerlive://add-account?currency=bitcoin"]
},
{
section: "Send",
title: "Send Flow",
url: "ledgerwallet://send",
description: "Opens the send page with optional currency pre-selection.",
parameters: [
{ name: "currency", required: false, description: "The currency to pre-fill in account search" }
],
examples: ["ledgerwallet://send", "ledgerwallet://send?currency=ethereum", "ledgerlive://send", "ledgerlive://send?currency=ethereum"]
},
{
section: "Receive",
title: "Receive Flow",
url: "ledgerwallet://receive",
description: "Opens the receive page with optional currency pre-selection.",
parameters: [
{ name: "currency", required: false, description: "The currency to pre-fill in account search" }
],
examples: ["ledgerwallet://receive", "ledgerwallet://receive?currency=ethereum", "ledgerlive://receive", "ledgerlive://receive?currency=ethereum"]
},
{
section: "Buy Crypto",
title: "Buy Crypto Flow",
url: "ledgerwallet://buy",
description: "Opens the buy crypto page with optional currency pre-selection.",
examples: ["ledgerwallet://buy", "ledgerwallet://buy/bitcoin", "ledgerlive://buy", "ledgerlive://buy/bitcoin"]
},
{
section: "Sell Crypto",
title: "Sell Crypto Flow",
url: "ledgerwallet://sell",
description: "Opens the sell crypto page with optional currency pre-selection.",
examples: ["ledgerwallet://sell", "ledgerwallet://sell/bitcoin", "ledgerlive://sell", "ledgerlive://sell/bitcoin"]
},
{
section: "MyLedger",
title: "Device Management Flow",
url: "ledgerwallet://myledger",
description: "Opens the MyLedger page for device management with optional app search.",
parameters: [
{ name: "installApp", required: false, description: "Search query to pre-fill when MyLedger opens" }
],
examples: ["ledgerwallet://myledger", "ledgerwallet://myledger?installApp=bitcoin", "ledgerlive://myledger", "ledgerlive://myledger?installApp=bitcoin"]
},
{
section: "Swap",
title: "Swap Crypto Flow",
url: "ledgerwallet://swap",
description: "Opens the swap crypto page.",
examples: ["ledgerwallet://swap", "ledgerlive://swap"]
},
{
section: "Perps",
title: "Perpetuals Trading",
url: "ledgerwallet://perps",
description: "Opens the perpetuals trading page.",
examples: ["ledgerwallet://perps", "ledgerlive://perps"]
},
{
section: "Market",
title: "Market Detail Page",
url: "ledgerlive://market/:currencyId",
description: "Opens the market detail page for a specific cryptocurrency. When the Wallet 4.0 `aggregatedAssets` param is enabled, opens the Asset Detail screen with source = \"deeplink_market\"; otherwise opens the Market Detail screen (charts / stats). Invalid or missing currencyId falls back to the market list.",
parameters: [
{ name: "currencyId", required: true, description: "The ID of the cryptocurrency (e.g., bitcoin, ethereum)" }
],
examples: [
"ledgerwallet://market/bitcoin",
"ledgerwallet://market/ethereum",
"ledgerlive://market/bitcoin",
"ledgerlive://market/ethereum",
"ledgerlive://market/solana"
]
},
{
section: "Discover",
title: "Live Discover Catalog",
url: "ledgerwallet://discover/:liveAppId/",
description: "Opens the discover catalog or specific live app with optional parameters.",
parameters: [
{ name: "liveAppId", required: false, description: "The liveApp id", type: "url" },
{ name: "&{params}", required: false, description: "URL query params transmitted to the liveApp", type: "query" }
],
examples: [
"ledgerwallet://discover",
"ledgerwallet://discover/paraswap",
"ledgerwallet://discover/paraswap?accountId=1",
"ledgerlive://discover",
"ledgerlive://discover/paraswap",
"ledgerlive://discover/paraswap?accountId=1"
]
},
{
section: "Wallet Connect",
title: "Wallet Connect",
url: "ledgerwallet://wc",
description: "Handles Wallet Connect URI connections.",
parameters: [
{ name: "uri", required: true, description: "URI to be passed to Wallet Connect" }
],
examples: ["ledgerwallet://wc?uri=${encodeURIComponent(url)}", "ledgerlive://wc?uri=${encodeURIComponent(url)}"]
},
{
section: "Settings",
title: "Settings Pages",
url: "ledgerwallet://settings/",
description: "Opens various settings pages.",
examples: [
"ledgerwallet://settings/",
"ledgerwallet://settings/general",
"ledgerwallet://settings/accounts",
"ledgerwallet://settings/about",
"ledgerwallet://settings/help",
"ledgerwallet://settings/developer",
"ledgerwallet://settings/notifications",
"ledgerwallet://settings/experimental",
"ledgerlive://settings/",
"ledgerlive://settings/general",
"ledgerlive://settings/accounts",
"ledgerlive://settings/about",
"ledgerlive://settings/help",
"ledgerlive://settings/developer",
"ledgerlive://settings/notifications",
"ledgerlive://settings/experimental"
]
},
{
section: "Ledger Sync",
title: "Ledger Sync",
url: "ledgerwallet://ledgersync",
description: "Opens the Ledger Sync functionality.",
examples: ["ledgerwallet://ledgersync", "ledgerlive://ledgersync"]
},
{
section: "Sync Onboarding",
title: "Onboarding",
url: "ledgerwallet://sync-onboarding",
description: "Opens the sync onboarding flow.",
examples: ["ledgerwallet://sync-onboarding", "ledgerlive://sync-onboarding"]
},
{
section: "Post Onboarding",
title: "Post Onboarding",
url: "ledgerwallet://post-onboarding",
description: "Opens the post onboarding flow with optional device parameter.",
parameters: [
{ name: "device", required: false, description: "Type of device" }
],
examples: ["ledgerwallet://post-onboarding", "ledgerwallet://post-onboarding?device=stax", "ledgerlive://post-onboarding", "ledgerlive://post-onboarding?device=stax"]
},
{
section: "Large Movers",
title: "Large Movers Landing Page",
url: "ledgerwallet://landing-page-large-mover?currencyIds=BTC,ETH",
description: "Opens the large movers landing page with specific currency tracking.",
parameters: [
{ name: "currencyIds", required: true, description: "tickers (list of tickers = BTC, ETH, XRP, SOL, ADA, SUI, more to come)" }
],
examples: [
"ledgerwallet://landing-page-large-mover?currencyIds=BTC,ETH",
"ledgerwallet://landing-page-large-mover?currencyIds=BTC,ETH,XRP",
"ledgerwallet://landing-page-large-mover?currencyIds=SOL,ADA,SUI",
"ledgerwallet://landing-page-large-mover?currencyIds=BTC",
"ledgerlive://landing-page-large-mover?currencyIds=BTC,ETH",
"ledgerlive://landing-page-large-mover?currencyIds=BTC,ETH,XRP",
"ledgerlive://landing-page-large-mover?currencyIds=SOL,ADA,SUI",
"ledgerlive://landing-page-large-mover?currencyIds=BTC"
]
},
{
section: "Miscellaneous",
title: "Other DeepLinks",
url: "ledgerwallet://landing-page?useCase=LP_Generic",
description: "Various other deeplinks for specific functionality.",
examples: [
"ledgerwallet://landing-page?useCase=LP_Generic",
"ledgerwallet://hw-purchase-success",
"ledgerwallet://custom-image",
"ledgerwallet://scan-accounts",
"ledgerlive://landing-page?useCase=LP_Generic",
"ledgerlive://hw-purchase-success",
"ledgerlive://custom-image",
"ledgerlive://scan-accounts"
]
}
]
};
// Initialize the page
document.addEventListener('DOMContentLoaded', function() {
generateContent(appConfig);
initializeEventListeners();
});
// Function to generate the content
function generateContent(config) {
const content = document.getElementById('content');
let html = '';
// Add usage instructions
html += `
<div class="warning">
<strong>💡 How to use this page:</strong>
<ul style="margin: 10px 0 0 20px; list-style-type: disc;">
<li>You can modify any deeplink by editing the input field above each section</li>
<li>Click on any example to automatically fill the input field with that deeplink</li>
<li>Use the "Test" button at the bottom of each section to test your modified deeplink</li>
</ul>
</div>
`;
// Add warning note
html += `
<div class="warning">
<strong>⚠️ Important Note:</strong>
You should not use anchor tags inside your deeplinks. This is especially true for discover related deeplinks. Everything after an anchor tag is client side and will not be forwarded to the liveApp.
</div>
`;
// Add platform-specific note
if (config.platformNote) {
html += `
<div class="platform-note">
<strong>${config.platformNote.title}</strong>
${config.platformNote.content}
</div>
`;
}
// Generate sections
config.deeplinks.forEach(deeplink => {
html += `
<div class="section">
<h2>${deeplink.section}</h2>
<div class="deeplink-item">
<div class="deeplink-title">${deeplink.title}</div>
<div class="deeplink-url">${deeplink.url}</div>
<div class="deeplink-description">${deeplink.description}</div>
<div class="deeplink-input-container">
<input type="text" class="deeplink-input" value="${deeplink.url}" placeholder="Modify the deeplink here...">
</div>
`;
if (deeplink.parameters) {
html += `
<div class="parameters">
<h4>Query Parameters:</h4>
<ul class="parameter-list">
`;
deeplink.parameters.forEach(param => {
const required = param.required ? "(required)" : "(optional)";
html += `<li><strong>${param.name}</strong> ${required}: ${param.description}</li>`;
});
html += `
</ul>
</div>
`;
}
if (deeplink.examples) {
html += `
<div class="deeplink-examples">
<h4>Examples:</h4>
<ul class="example-list">
`;
deeplink.examples.forEach(example => {
html += `<li>${example}</li>`;
});
html += `
</ul>
</div>
`;
}
html += `
<a href="${deeplink.url}" class="clickable-link" onclick="testDeeplink(this)">Test ${deeplink.section} Link</a>
</div>
</div>
`;
});
content.innerHTML = html;
}
// Function to initialize event listeners
function initializeEventListeners() {
// Handle deeplink input changes
const inputs = document.querySelectorAll('.deeplink-input');
inputs.forEach(input => {
input.addEventListener('input', function() {
const link = this.parentElement.querySelector('.clickable-link');
if (link) {
link.href = this.value;
}
});
});
// Handle example clicks
const examples = document.querySelectorAll('.example-list li');
examples.forEach(example => {
example.addEventListener('click', function() {
setExample(this);
});
});
}
// Function to test deeplinks
function testDeeplink(linkElement) {
const input = linkElement.parentElement.querySelector('.deeplink-input');
if (input) {
linkElement.href = input.value;
}
console.log('Testing deeplink:', linkElement.href);
}
// Function to set example in input
function setExample(exampleElement) {
const deeplinkItem = exampleElement.closest('.deeplink-item');
const input = deeplinkItem.querySelector('.deeplink-input');
const link = deeplinkItem.querySelector('.clickable-link');
if (input && link) {
input.value = exampleElement.textContent;
link.href = exampleElement.textContent;
// Add visual feedback
input.style.borderColor = '#ff6b35';
input.style.boxShadow = '0 0 0 2px rgba(255, 107, 53, 0.3)';
setTimeout(() => {
input.style.borderColor = '#444444';
input.style.boxShadow = 'none';
}, 1000);
}
}
</script>
</body>
</html>