Adding «Donate» Bitcoin button in README.md file GitHub repository 1. Summary

I would like to add a «Donate» Bitcoin button on my README.md file located on my GitHub repository.



2. Not helped

2.1. Manually button

HTML-code using bitcoin protocol:



&lt;a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037"&gt;&lt;img src="https://www.drupal.org/files/project-images/bitcoindonate.png" alt="Bitcoin Donate Button"&gt;&lt;/a&gt;


It's work on HTML page of my GitHub Pages site, demonstration.

But in .md GitHub files not one codes of Meta Stack Exchange answer not work for bitcoin protocol, demonstration.



&lt;a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037"&gt;&lt;img src="https://www.drupal.org/files/project-images/bitcoindonate.png" alt="Bitcoin Donate Button"&gt;&lt;/a&gt;

[**![Bitcoin Donate Button**](https://www.drupal.org/files/project-images/bitcoindonate.png)](bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037)

&lt;a href="bitcoin:1DF9jgzftTFn4ZnDV2YEjUtZ3uHtBywj57?label=In%20the%20treatment%20of%20Sasha's%20teeth&amp;amp;amount=0.0037"&gt;![Bitcoin Donate Button](https://www.drupal.org/files/project-images/bitcoindonate.png)&lt;/a&gt;


2.2. Third-party

JavaScript not supported on GitHub README.md pages. By this reason doesn't help me:


Bitcoinate
Bitcoin donate
Leo Bogert simple button
1. Demonstration



Click to donate button on page:

https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/README.md

Link must be opened in your Bitcoin client, example:





2. Relevance

This answer is relevant for April 2018. In the future, the data of this answer may be obsolete.



3. Redirect

You need to use redirect.

User click on Donate button → is redirected to Bitcoin-Redirect page in current tab → then opened bitcoin wallet of user → in current tab is opened page, on which Donate button is situated.



4. Details

4.1. Source of Donate button



[![Bitcoin Donate Button](https://i.stack.imgur.com/MnQ6V.png)](http://KristinitaTest.github.io/donate/Bitcoin-Redirect)


If you click the image, you will go to a page http://KristinitaTest.github.io/donate/Bitcoin-Redirect. See answer on Meta Stack Exchange, how use Markdown markup for this construction. Alternative worked HTML source:



&lt;a href="http://KristinitaTest.github.io/donate/Bitcoin-Redirect"&gt;&lt;img src="https://i.stack.imgur.com/MnQ6V.png"&gt;&lt;/a&gt;


4.2. Source of Bitcoin-Redirect page



&lt;script&gt;
window.location.href = "bitcoin:17uctxtsWG3gpyAy6iJ8AVd5rdSjkJH2?label=In%20the%20treatme0of%20Sasha's%20teeth&amp;amp;amount=0.0037";
history.back();
&lt;/script&gt;


Use JavaScript methods window.location.href and history.back.