Cryptocurrency mining on web browser

This is how you can mine cryptocurrency Monero (XMR) on your browser. If you put code on your website, people who visit your page also mine for you. You can see it in action on my donate page. I only show user interface version, but there is version with out it. There is a risk, It is that any website you are using can use it without you knowing it.

Before you can do this you need to know little bit of HTML and you need an account to coinhive.com. First here is what it should look like.

And Coinhive in action

First you need to load miner.min.js. Just add next line in your websites code anywhere.

<script src="https://coinhive.com/lib/miner.min.js" async></script>
Load javascript code

Next make <div> with coinhive-miner class where you want your miner to be. Then select the size of UI Miner by using the code like this:

style="width: 256px; height: 310px"
Style

Next you have to specify your site-key by putting next code:

data-key="YOUR_SITE_KEY"

And the last lets put something to the people who use ad block.  Next code goes inside of <div>:

<em>Please disable Adblock!</em>

Now you have fully working cryptocurrency miner.

Here is full code:

<script src="https://coinhive.com/lib/miner.min.js" async></script>
<div class="coinhive-miner" 
	style="width: 256px; height: 310px"
	data-key="YOUR_SITE_KEY">
	<em>Please disable Adblock!</em>
</div>
Full code

Basicly just put that code in your website and you should be okay.

More information you can find HERE.

To get your money out of Coinhive you need Monero-wallet. Here is the simpple one mymonero.com. Minimum amount you can get out is 0,5XMR

 

Sources:

https://coinhive.com/

https://coinhive.com/documentation/simple-ui

My first post

This blog is my new blog. I will be posting about things i am interested in. I am interested in music, technology, like cloud-computing and IOT, and gaming. My other blog is here and i will be posting school stuff there.

My music you can find in soundcloud. Here is the link:

https://soundcloud.com/leoaalto