export const renderDonateButton = (containerEl: HTMLElement) => { containerEl.createEl('h3', { text: 'Support development' }); const donateText = containerEl.createEl('p'); donateText.appendChild( createEl('span', { text: 'If you enjoy Bulk Rename, consider ', }), ); donateText.appendChild( createEl('a', { text: 'buying me a coffee', href: 'https://www.buymeacoffee.com/oleglustenko', }), ); donateText.appendChild( createEl('span', { text: ', and following me on Twitter ', }), ); donateText.appendChild( createEl('a', { text: '@oleglustenko', href: 'https://twitter.com/oleglustenko', }), ); const div = containerEl.createEl('div', { cls: 'bulkrename-donation', }); const parser = new DOMParser(); div.appendChild( createDonateButton( 'https://www.buymeacoffee.com/oleglustenko', parser.parseFromString(buyMeACoffee, 'text/xml').documentElement, ), ); }; const createDonateButton = (link: string, img: HTMLElement): HTMLElement => { const a = document.createElement('a'); a.setAttribute('href', link); a.addClass('bulkrename-donate-button'); a.appendChild(img); return a; }; const buyMeACoffee = ` `;