list_ssl.js 515 B

1234567891011121314
  1. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  2. function saveTextToBlob(file, element) {
  3. const downloadLink = document.createElement('a');
  4. downloadLink.style.display = 'none';
  5. downloadLink.textContent = 'Download File';
  6. downloadLink.download = file;
  7. downloadLink.href = window.URL.createObjectURL(
  8. new Blob([document.getElementById(element).value], { type: 'text/plain' })
  9. );
  10. const child = document.body.appendChild(downloadLink);
  11. downloadLink.click();
  12. document.body.removeChild(child);
  13. }