MCPcopy Index your code
hub / github.com/ChinaGodMan/UserScripts / showDialog

Function showDialog

web-clipper/web-clipper.user.js:494–511  ·  view source on GitHub ↗
(info, link)

Source from the content-addressed store, hash-verified

492 elements.cancelButton.addEventListener('click', () => modalContainer.remove())
493 }
494 function showDialog(info, link) {
495 const modalHTML = `
496 <div class="modal-overlay">
497 <div class="modal-content">
498 <button class="modal-close-btn" id="cancel-token" >×</button>
499 <h3 class="modal-title">${info}</h3>
500 <p class="modal-description">
501 ${info}
502 <a href="${link}" target="_blank" rel="noopener noreferrer">${link}</a>
503 </p>
504 </div>
505 </div>
506 `
507 const modalContainer = document.createElement('div')
508 modalContainer.innerHTML = modalHTML
509 document.body.appendChild(modalContainer)
510 modalContainer.querySelector('#cancel-token').addEventListener('click', () => modalContainer.remove())
511 }
512 // HTML2Markdown
513 function convertToMarkdown(element) {
514 var html = element.outerHTML

Callers 1

createIssueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected