(previewDiv, fullContentDiv)
| 333 | } |
| 334 | |
| 335 | function makePreviewClickable(previewDiv, fullContentDiv) { |
| 336 | let isExpanded = false; |
| 337 | |
| 338 | previewDiv.style.cursor = 'pointer'; |
| 339 | previewDiv.title = 'Click to expand'; |
| 340 | |
| 341 | previewDiv.addEventListener('click', function() { |
| 342 | isExpanded = !isExpanded; |
| 343 | |
| 344 | if (isExpanded) { |
| 345 | previewDiv.style.display = 'none'; |
| 346 | fullContentDiv.style.display = 'block'; |
| 347 | |
| 348 | fullContentDiv.style.cursor = 'pointer'; |
| 349 | fullContentDiv.title = 'Click to collapse'; |
| 350 | |
| 351 | const collapseHandler = function() { |
| 352 | previewDiv.style.display = 'block'; |
| 353 | fullContentDiv.style.display = 'none'; |
| 354 | fullContentDiv.removeEventListener('click', collapseHandler); |
| 355 | }; |
| 356 | |
| 357 | fullContentDiv.addEventListener('click', collapseHandler); |
| 358 | } |
| 359 | }); |
| 360 | } |
| 361 | |
| 362 | function updateHistoryDisplay() { |
| 363 | const history = getHistory(); |
no outgoing calls
no test coverage detected