Code Monkey home page Code Monkey logo

nimiq-widget's Introduction

Built With Stencil

Nimiq Widget

The Nimiq Widget is a small utility web component for Nimiq mining. It can be used to monetize a website by using the user's computing power to generate revenue.

Screenshot of Widget

Usage

Include this code in your <head> of your HTML

<head>
  <!-- ... -->
  <script src='https://unpkg.com/nimiq-widget@1/dist/nimiqwidget.js'></script>
  <!-- ... -->
</head>

Put the widget component, somewhere in the <body> section of your HTML. Don't forget to replace the Nimiq address with yours. You can create a new Nimiq Wallet here: https://safe.nimiq.com

<nimiq-widget address="NQ54 EHLN L135 RBFU 305P 0GJT GTU0 S3G3 8MKJ"></nimiq-widget>

Customization

You can customize the behaviour of the Nimiq Widget, documentation for the component options is available here.

nimiq-widget's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

som2y sushipool

nimiq-widget's Issues

detect adblock blocking connection to seed nodes

I'm submitting a:

[ ] bug report
[ x ] feature request

Current behavior:

When nimiq.com is whitelisted, CDN is accessible and file can be downloaded but all websocket connections are blocked by adblocker.

Expected behavior:

Widget should detect in that case that multiple websocket connections fail and should prompt user to disable adblock.

Steps to reproduce:

Related code:

// insert any relevant code here

Other information:

better adblock / brave detection

I'm submitting a:

[ x ] bug report
[ ] feature request

Current behavior:

On Brave Browser, Nimiq CDN is blocked but it does not return an error code.

Expected behavior:

Widget should detect that script is blocked and prompt the user to disable Shield.

Steps to reproduce:

  1. Open Brave
  2. Go to https://mariofriz.github.io/nimiq-widget/index.html
  3. Agree to terms

You are now stuck on "Connecting..."

Related code:

// insert any relevant code here

Other information:

do not prompt user on second page load if already agreed

I'm submitting a:

[ ] bug report
[ x ] feature request

Current behavior:

When user loads a page, he has to approve terms before widget starts mining.

Expected behavior:

Once user has approved terms, we should store the decision and start mining directly.

Steps to reproduce:

Related code:

// insert any relevant code here

Other information:

open widget on startup

I'm submitting a:

[ ] bug report
[ x ] feature request

Current behavior:

Widget is in minized state on startup, user has to click on it to open.

Expected behavior:

There should be a property to open widget, and show terms on startup.
This will draw more attention from the user and increase the mining activity.

Steps to reproduce:

Related code:

<nimiq-widget auto-open="true"></nimiq-widget>

Other information:

support for changing mining pool

I'm submitting a:

[ ] bug report
[ x ] feature request

Current behavior:

The pool is set to eu.sushipool.com:443 and cannot be changed

Expected behavior:

The mining pool can be changed by specifying it with a property

Steps to reproduce:

Related code:

Proposed behaviour:

<nimiq-widget pool="eu.nimpool.io:8444"></nimiq-widget>

Other information:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.