Skip to content

JavaScript iconhash

ChMarina edited this page May 28, 2018 · 2 revisions

JavaScript-iconhash

Repository metahashorg/iconhash_js contains JavaScript library which allows to generate personal identification icon for any Metahash address.

Usage

<script src="blockies.js"></script>
<script> 
  function SetIcon() {
    var address = document.getElementById('addr').value; 
    var icon = document.getElementById('icon');
    icon.style.backgroundImage = 'url(' + blockies.create({ seed:address ,size: 8,scale: 16}).toDataURL()+')' 
  }
</script>

For more information about the required dependencies and usage of the source code, please see the repository.

Clone this wiki locally