The community around Ethereum is awesome. The MetaMask is a great browser plugin for the Ethereum blockchain, serving many Ðapps, like some collectable, breedable and adorable creatures.

MetaMask can serve the tipping purpose easily. This post is largely adapted from their own demo: TipButton. This post demos how to embed such donation link in a Jekyll Github page, very straightforward.

The Tip Button

Here we go:

It is SAFE to click it. An additional window will prompt up BEFORE you actually send the 0.005 ether to me, which is equivalent to a coffee by today 2018-04-16.

If you don’t have MetaMask installed, please consider visiting MetaMask.

What is it doing?

Metamask provides the web3.js object for your browser that communicates with the blockchain in the air, manages your accounts, and most importantly protects (hopefully) your private keys.

When you initiate a transaction on the Ethereum blockchain, it prompts a window to ask for your permission to sign the transaction.

The tipping transaction is constructed in the embedded javascript code.

If you hit confirm it, I will get the 0.005 ether after this transaction is mined into the chain.

Thanks!

The Embedded JavaScript

The script is very simple and straightforward:

<script>vartipButton=document.querySelector('.tip-button');tipButton.addEventListener('click',function(){if(typeofweb3==='undefined'){returnalert('You need to install MetaMask to use this feature.')}varuser_address=web3.eth.accounts[0];if(typeofuser_address==='undefined'){returnalert('You need to log in MetaMask to use this feature.')}web3.eth.sendTransaction({to:"0x01eD38686432FFc8082D622A7a73c97dd4F3502b",from:user_address,value:web3.toWei('0.005','ether'),},function(err,transactionHash){if(err)returnalert('Thanks for trying out!');alert('Thanks for the generosity!!');})})</script>

Google VR view allows developer to host VR content very easily with various platforms, including Android, iOS and Web. The content being hosted can be image or video, mono or stereo. Developer is also able to embed hotspot to allow user interaction with the VR content. More importantly, the VR view repository is open-source on Github.

In this post, I embedded some sample VR view widgets on my Jekyll page hosted on Github. All you need is a Google Cardboard to experience the 3D immersive world!

Showcase

Mono 360 Image

Stereo 360 Image

If you are using a browser on PC, the mono and stereo 360 images are rendered in the same way. Differences come when you are using a browser on a phone, and by clicking the Cardboard button on the widget. The script will redirect you to the Cardboard viewing mode.

Mono 360 image is rendered on a sphere, and pixel will be placed at the same focal distance. With stereo 3D image, the vergence of your eye will give you binocular vision.