Skip to content

Commit

Permalink
Merge pull request #14 from fdagner/navigation
Browse files Browse the repository at this point in the history
refactoring
  • Loading branch information
fdagner authored Feb 13, 2024
2 parents 75b83aa + 362f891 commit e2f5527
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/buchungssatz.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@ function generiereBuchungssatz() {


function buchungssatzHerunterladen() {
herunterladen('buchungssatzContainer', 'buchungssatz');
const emailHTML = document.getElementById('buchungssatzContainer').innerHTML.replace(/ /g, ' ');;
const blob = new Blob([emailHTML], { type: 'html' });
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'buchungssatz.html';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}



function buchungssatzKopiereInZwischenablage() {
const buchungssatzHTML = document.getElementById('buchungssatzContainer').innerHTML;
navigator.clipboard.writeText(buchungssatzHTML)
Expand Down

0 comments on commit e2f5527

Please sign in to comment.