-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrello.html
More file actions
623 lines (551 loc) · 28.5 KB
/
trello.html
File metadata and controls
623 lines (551 loc) · 28.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trello Card Details Viewer</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Marked.js CDN for Markdown rendering -->
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<style>
body {
font-family: 'Inter', sans-serif;
background-color: #f3f4f6; /* Light gray background */
}
/* General styles for individual cards within groups */
.card-detail-item {
background-color: #ffffff;
border-radius: 0.5rem; /* rounded-lg */
padding: 1rem; /* p-4 */
margin-top: 0.75rem; /* mt-3 */
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); /* shadow-sm */
border: 1px solid #e2e8f0; /* gray-200 */
}
.card-detail-item h4 {
font-size: 1.25rem; /* text-xl */
font-weight: 600; /* font-semibold */
color: #1f2937; /* text-gray-900 */
margin-bottom: 0.5rem; /* mb-2 */
}
.description-content { /* Applied to both individual card descriptions and all-cards summary */
color: #4b5563; /* text-gray-700 */
line-height: 1.6;
}
/* Specific styles for rendered Markdown */
.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6 {
font-weight: bold;
margin-top: 1em;
margin-bottom: 0.5em;
word-wrap: break-word; /* Ensure long links/headers break */
}
.description-content h1 { font-size: 1.625rem; } /* adjusted for nested context */
.description-content h2 { font-size: 1.375rem; }
.description-content h3 { font-size: 1.125rem; }
.description-content p {
margin-bottom: 1em;
word-wrap: break-word; /* Ensure long links/text break */
}
.description-content ul,
.description-content ol {
list-style-position: inside;
margin-bottom: 1em;
padding-left: 1.5em;
}
.description-content ul li {
list-style-type: disc;
}
.description-content ol li {
list-style-type: decimal;
}
.description-content pre {
background-color: #e2e8f0; /* gray-200 */
padding: 0.75rem;
border-radius: 0.375rem;
overflow-x: auto;
margin-bottom: 1em;
word-wrap: break-word; /* Ensure long lines in code break */
white-space: pre-wrap; /* For preformatted text to wrap */
}
.description-content code {
font-family: 'Fira Code', 'Cascadia Code', monospace;
background-color: #e2e8f0; /* gray-200 */
padding: 0.125rem 0.25rem;
border-radius: 0.25rem;
word-wrap: break-word; /* Ensure long lines in code break */
}
.card-detail-item .labels-container {
margin-top: 0.75rem; /* mt-3 */
display: flex;
flex-wrap: wrap;
gap: 0.5rem; /* gap-2 */
}
.card-detail-item .label-item {
background-color: #e2e8f0; /* gray-200 */
color: #4a5568; /* gray-700 */
padding: 0.25rem 0.75rem; /* px-3 py-1 */
border-radius: 9999px; /* rounded-full */
font-size: 0.75rem; /* text-xs, slightly smaller for detail view */
}
/* Styles for MR - group containers */
.group-container {
background-color: #f8fafc; /* gray-50 */
border-radius: 0.75rem;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03); /* subtle shadow */
border: 1px solid #e5e7eb; /* gray-200 */
}
.group-container h4 {
font-size: 1.75rem; /* text-3xl */
font-weight: 700; /* font-bold */
color: #1f2937; /* text-gray-900 */
margin-bottom: 1rem;
}
.error-message-display {
color: #dc2626; /* text-red-600 */
font-weight: 500;
margin-top: 0.5rem;
padding: 0.75rem;
background-color: #fef2f2; /* red-50 */
border: 1px solid #fca5a5; /* red-300 */
border-radius: 0.5rem;
}
.toast-message {
position: fixed;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
background-color: #10b981; /* green-500 */
color: white;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
opacity: 0;
transition: opacity 0.3s ease-in-out;
z-index: 1000;
}
.toast-message.show {
opacity: 1;
}
</style>
</head>
<body class="p-4 sm:p-6 lg:p-8">
<div class="max-w-4xl mx-auto bg-white p-6 sm:p-8 rounded-xl shadow-lg">
<h1 class="text-3xl sm:text-4xl font-bold text-center mb-6 text-gray-800">
Trello Card Details Viewer
</h1>
<p class="text-center text-gray-600 mb-8">
Insert your API key, token, and a comma-separated list of Trello card IDs to view their names and descriptions.
</p>
<div class="space-y-4 mb-6">
<div>
<label for="apiKey" class="block text-sm font-medium text-gray-700 mb-1">
Trello API Key (Key)
</label>
<input
type="text"
id="apiKey"
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
placeholder="Your Trello API Key"
/>
</div>
<div>
<label for="apiToken" class="block text-sm font-medium text-gray-700 mb-1">
Trello API Token (Token)
</label>
<input
type="text"
id="apiToken"
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
placeholder="Your Trello API Token"
/>
</div>
<div>
<label for="cardIds" class="block text-sm font-medium text-gray-700 mb-1">
Trello Card IDs (comma-separated)
</label>
<textarea
id="cardIds"
rows="5"
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm resize-y"
placeholder="Example: id1, id2, id3, ..."
></textarea>
</div>
</div>
<div class="flex flex-col sm:flex-row gap-4">
<button
id="fetchButton"
class="flex-1 bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-md shadow-md transition duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
>
Load Card Details
</button>
<button
id="exportButton"
class="flex-1 bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-md shadow-md transition duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed"
disabled
>
Export Content to Clipboard
</button>
</div>
<button
id="shareButton"
class="w-full mt-4 bg-purple-600 hover:bg-purple-700 text-white font-bold py-2 px-4 rounded-md shadow-md transition duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed"
disabled
>
Share These Results
</button>
<div id="loading" class="text-center text-blue-600 mt-4 hidden">
Loading...
</div>
<div id="generalErrorMessages" class="mt-8 space-y-3">
<!-- General or per-card error messages will be displayed here -->
</div>
<div id="groupedResults" class="mt-8 hidden">
<h2 class="text-2xl sm:text-3xl font-bold text-center mb-6 text-gray-800">
Grouped Card Details
</h2>
<!-- Grouped cards will be displayed here -->
</div>
<!-- The overall summary section is also removed -->
</div>
<!-- Toast message for feedback -->
<div id="toast" class="toast-message"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const apiKeyInput = document.getElementById('apiKey');
const apiTokenInput = document.getElementById('apiToken');
const cardIdsInput = document.getElementById('cardIds');
const fetchButton = document.getElementById('fetchButton');
const exportButton = document.getElementById('exportButton');
const shareButton = document.getElementById('shareButton');
// Removed: const summarizeAllButton = document.getElementById('summarizeAllButton');
const groupedResultsDiv = document.getElementById('groupedResults');
// Removed: const allCardsSummarySection = document.getElementById('allCardsSummarySection');
// Removed: const allCardsSummaryContent = document.getElementById('allCardsSummaryContent');
// Removed: const allCardsSummaryLoading = document.getElementById('allCardsSummaryLoading');
const loadingDiv = document.getElementById('loading');
const generalErrorMessagesDiv = document.getElementById('generalErrorMessages');
const toastDiv = document.getElementById('toast');
let loadedCardsData = [];
// Function to display toast messages
function showToast(message, type = 'success') {
toastDiv.textContent = message;
if (type === 'success') {
toastDiv.style.backgroundColor = '#10b981'; // green-500
} else {
toastDiv.style.backgroundColor = '#dc2626'; // red-600
}
toastDiv.classList.add('show');
setTimeout(() => {
toastDiv.classList.remove('show');
}, 3000);
}
// Function to update URL with field values
function updateUrl() {
const params = new URLSearchParams();
const key = apiKeyInput.value.trim();
const token = apiTokenInput.value.trim();
const ids = cardIdsInput.value.trim();
if (key) params.set('key', key);
if (token) params.set('token', token);
if (ids) params.set('ids', ids);
history.replaceState(null, '', '?' + params.toString());
// Enable/disable share button based on initial input validity
if (key && token && ids) {
shareButton.disabled = false;
} else {
shareButton.disabled = true;
}
}
// Load data from URL on page load
const urlParams = new URLSearchParams(window.location.search);
const initialKey = urlParams.get('key');
const initialToken = urlParams.get('token');
const initialIds = urlParams.get('ids');
if (initialKey) apiKeyInput.value = initialKey;
if (initialToken) apiTokenInput.value = initialToken;
if (initialIds) cardIdsInput.value = initialIds;
// If all parameters are in the URL, automatically load cards
if (initialKey && initialToken && initialIds) {
setTimeout(() => {
fetchButton.click();
}, 100);
}
// Event listeners to update URL on field change
apiKeyInput.addEventListener('input', updateUrl);
apiTokenInput.addEventListener('input', updateUrl);
cardIdsInput.addEventListener('input', updateUrl);
fetchButton.addEventListener('click', async () => {
const key = apiKeyInput.value.trim();
const token = apiTokenInput.value.trim();
const idsString = cardIdsInput.value.trim();
generalErrorMessagesDiv.innerHTML = '';
groupedResultsDiv.innerHTML = '';
groupedResultsDiv.classList.add('hidden');
// Removed: allCardsSummarySection.classList.add('hidden');
// Removed: allCardsSummaryContent.innerHTML = '';
loadedCardsData = [];
loadingDiv.classList.remove('hidden');
exportButton.disabled = true;
shareButton.disabled = true;
// Removed: summarizeAllButton.disabled = true;
if (!key || !token || !idsString) {
loadingDiv.classList.add('hidden');
generalErrorMessagesDiv.innerHTML = '<p class="error-message-display text-center">Please fill in all fields.</p>';
showToast('Please fill in all fields.', 'error');
return;
}
const cardIds = idsString.split(',').map(id => id.trim()).filter(id => id);
if (cardIds.length === 0) {
loadingDiv.classList.add('hidden');
generalErrorMessagesDiv.innerHTML = '<p class="error-message-display text-center">No valid card IDs found.</p>';
showToast('No valid card IDs found.', 'error');
return;
}
let anyCardFetchedSuccessfully = false;
for (const cardId of cardIds) {
const url = `https://api.trello.com/1/cards/${cardId}?key=${key}&token=${token}&labels=all`;
try {
const response = await fetch(url);
if (!response.ok) {
let errorMessage = `Error loading card ${cardId}: Status ${response.status}`;
try {
const errorData = await response.json();
if (errorData && errorData.message) {
errorMessage += ` - ${errorData.message}`;
}
} catch (parseError) {
}
displayCardError(cardId, errorMessage);
continue;
}
const data = await response.json();
loadedCardsData.push({
id: data.id,
name: data.name,
desc: data.desc || '',
labels: data.labels || [],
url: data.url
});
anyCardFetchedSuccessfully = true;
} catch (error) {
displayCardError(cardId, `Network or CORS error loading card ${cardId}: ${error.message}`);
}
}
loadingDiv.classList.add('hidden');
if (anyCardFetchedSuccessfully) {
exportButton.disabled = false;
shareButton.disabled = false;
// Removed: summarizeAllButton.disabled = false;
displayGroupedCards();
} else if (generalErrorMessagesDiv.children.length > 0 && loadedCardsData.length === 0) {
generalErrorMessagesDiv.innerHTML += '<p class="error-message-display text-center mt-4">An error occurred while loading all cards. Please check your data and the console for more details.</p>';
} else if (loadedCardsData.length === 0) {
generalErrorMessagesDiv.innerHTML = '<p class="error-message-display text-center">No cards found to load with the provided IDs.</p>';
}
});
// Function to display grouped cards in HTML
function displayGroupedCards() {
const mrLabelsMap = new Map();
const OTHER_CARDS_LABEL = 'Other Cards';
loadedCardsData.forEach(card => {
let hasMrLabel = false;
if (card.labels) {
card.labels.forEach(label => {
if (label.name.startsWith('MR -')) {
hasMrLabel = true;
if (!mrLabelsMap.has(label.name)) {
mrLabelsMap.set(label.name, []);
}
mrLabelsMap.get(label.name).push(card);
}
});
}
if (!hasMrLabel) {
if (!mrLabelsMap.has(OTHER_CARDS_LABEL)) {
mrLabelsMap.set(OTHER_CARDS_LABEL, []);
}
mrLabelsMap.get(OTHER_CARDS_LABEL).push(card);
}
});
if (mrLabelsMap.size > 0) {
groupedResultsDiv.classList.remove('hidden');
groupedResultsDiv.innerHTML = ''; // Clear previous grouped results content
const sortedMrLabels = Array.from(mrLabelsMap.keys()).sort((a, b) => {
if (a === OTHER_CARDS_LABEL) return 1;
if (b === OTHER_CARDS_LABEL) return -1;
return a.localeCompare(b);
});
sortedMrLabels.forEach(labelName => {
const groupContainer = document.createElement('div');
groupContainer.classList.add('group-container');
const labelHeading = document.createElement('h4');
labelHeading.textContent = labelName;
groupContainer.appendChild(labelHeading);
mrLabelsMap.get(labelName).sort((a, b) => a.name.localeCompare(b.name)).forEach(card => {
const cardDetailElement = document.createElement('div');
cardDetailElement.classList.add('card-detail-item');
const cardNameElement = document.createElement('h4');
cardNameElement.textContent = card.name;
cardDetailElement.appendChild(cardNameElement);
const descContainer = document.createElement('div');
descContainer.classList.add('description-content');
descContainer.innerHTML = marked.parse(card.desc || 'No description.');
cardDetailElement.appendChild(descContainer);
if (card.labels && card.labels.length > 0) {
const labelsContainer = document.createElement('div');
labelsContainer.classList.add('labels-container');
card.labels.forEach(label => {
const labelItem = document.createElement('span');
labelItem.classList.add('label-item');
labelItem.textContent = label.name;
labelsContainer.appendChild(labelItem);
});
cardDetailElement.appendChild(labelsContainer);
}
const linkElement = document.createElement('a');
linkElement.href = card.url;
linkElement.textContent = 'View on Trello';
linkElement.target = '_blank';
linkElement.classList.add('text-blue-500', 'hover:underline', 'block', 'mt-2');
cardDetailElement.appendChild(linkElement);
// Removed: Summarize Description button and related summary display/loading
// const summarizeButton = document.createElement('button');
// summarizeButton.textContent = 'Summarize Description ✨';
// summarizeButton.classList.add('mt-4', 'bg-yellow-500', 'hover:bg-yellow-600', 'text-white', 'font-bold', 'py-1.5', 'px-3', 'rounded-md', 'shadow-sm', 'transition', 'duration-200', 'ease-in-out', 'focus:outline-none', 'focus:ring-2', 'focus:ring-yellow-400', 'focus:ring-offset-2', 'text-sm');
// cardDetailElement.appendChild(summarizeButton);
// const summaryDisplay = document.createElement('div');
// summaryDisplay.classList.add('mt-3', 'p-3', 'bg-blue-50', 'rounded-md', 'text-gray-700', 'text-sm', 'hidden'); // Hidden by default
// cardDetailElement.appendChild(summaryDisplay);
// const summaryLoading = document.createElement('div');
// summaryLoading.textContent = 'Generating summary...';
// summaryLoading.classList.add('text-blue-500', 'mt-3', 'hidden'); // Hidden by default
// cardDetailElement.appendChild(summaryLoading);
// summarizeButton.addEventListener('click', async () => {
// summarizeButton.disabled = true;
// summaryDisplay.classList.add('hidden');
// summaryLoading.classList.remove('hidden');
// const summaryText = await generateSummary(card.desc);
// summaryLoading.classList.add('hidden');
// summaryDisplay.classList.remove('hidden');
// summaryDisplay.innerHTML = marked.parse(summaryText);
// summarizeButton.disabled = false;
// });
groupContainer.appendChild(cardDetailElement);
});
groupedResultsDiv.appendChild(groupContainer);
});
} else {
groupedResultsDiv.innerHTML = '<p class="text-center text-gray-600">No cards found with "MR -" labels or any other cards.</p>';
groupedResultsDiv.classList.remove('hidden');
}
}
// Removed: Function to call Gemini API for summary of a single card description
// async function generateSummary(textToSummarize) { ... }
// Removed: Function to generate a summary for ALL loaded cards and its event listener
// summarizeAllButton.addEventListener('click', async () => { ... }
exportButton.addEventListener('click', () => {
if (loadedCardsData.length === 0) {
showToast('No cards loaded to export.', 'error');
return;
}
let clipboardContent = '';
// Part 1: General list of all cards (kept for export if useful)
clipboardContent += '--- All Loaded Cards ---\n\n';
loadedCardsData.forEach((card, index) => {
clipboardContent += `Title: ${card.name}\n`;
clipboardContent += `Description:\n${card.desc || 'No description.'}\n`;
if (card.labels && card.labels.length > 0) {
clipboardContent += `Labels: ${card.labels.map(label => label.name).join(', ')}\n`;
}
clipboardContent += `Link: ${card.url}\n`;
if (index < loadedCardsData.length - 1) {
clipboardContent += `\n---\n\n`;
}
});
// Part 2: Grouping by "MR -" labels (and "Other Cards") for export
const mrLabelsMap = new Map();
const OTHER_CARDS_LABEL = 'Other Cards';
loadedCardsData.forEach(card => {
let hasMrLabel = false;
if (card.labels) {
card.labels.forEach(label => {
if (label.name.startsWith('MR -')) {
hasMrLabel = true;
if (!mrLabelsMap.has(label.name)) {
mrLabelsMap.set(label.name, []);
}
mrLabelsMap.get(label.name).push({ name: card.name, url: card.url });
}
});
}
if (!hasMrLabel) {
if (!mrLabelsMap.has(OTHER_CARDS_LABEL)) {
mrLabelsMap.set(OTHER_CARDS_LABEL, []);
}
mrLabelsMap.get(OTHER_CARDS_LABEL).push({ name: card.name, url: card.url });
}
});
if (mrLabelsMap.size > 0) {
clipboardContent += '\n\n--- Grouped by "MR -" and "Other Cards" ---\n\n';
const sortedMrLabels = Array.from(mrLabelsMap.keys()).sort((a, b) => {
if (a === OTHER_CARDS_LABEL) return 1;
if (b === OTHER_CARDS_LABEL) return -1;
return a.localeCompare(b);
});
sortedMrLabels.forEach(labelName => {
clipboardContent += `${labelName}\n`;
mrLabelsMap.get(labelName).sort((a, b) => a.name.localeCompare(b.name)).forEach(card => {
clipboardContent += ` - ${card.name} (${card.url})\n`;
});
clipboardContent += `\n`;
});
}
// Copy to clipboard
const tempTextArea = document.createElement('textarea');
tempTextArea.value = clipboardContent;
document.body.appendChild(tempTextArea);
tempTextArea.select();
try {
document.execCommand('copy');
showToast('Content copied to clipboard.');
} catch (err) {
console.error('Error copying to clipboard:', err);
showToast('Error copying to clipboard.', 'error');
} finally {
document.body.removeChild(tempTextArea);
}
});
shareButton.addEventListener('click', () => {
const currentUrl = window.location.href;
const tempTextArea = document.createElement('textarea');
tempTextArea.value = currentUrl;
document.body.appendChild(tempTextArea);
tempTextArea.select();
try {
document.execCommand('copy');
showToast('Results link copied to clipboard!');
} catch (err) {
console.error('Error copying link to clipboard:', err);
showToast('Error copying link.', 'error');
} finally {
document.body.removeChild(tempTextArea);
}
});
function displayCardError(cardId, message) {
const errorElement = document.createElement('div');
errorElement.classList.add('error-message-display');
errorElement.innerHTML = `<strong>Error on card ${cardId}:</strong> ${message}`;
generalErrorMessagesDiv.appendChild(errorElement);
}
updateUrl();
});
</script>
</body>
</html>