pokemon-go-iv-calculator
pokemon-go-iv-calculator copied to clipboard
PHP?
Can i call this JS function in a php file? Thanks
you can use browserify to make this fully client side and then just use it like any other javascript in the frontend
Hi @ZeroDragon I'm interested about your suggestion, unfortunately I never used browserify.
I installed it through:
npm install -g browserify
than I run:
npm install underscore
and than:
browserify index.js -o bundle.js
is that correct? Now to use it in a html5 form, I simply add this bund.js into the head section?
what's the functions to call from my form?
Thank you for you precious help.
best regards ^^
This is exactly what I did:
temp.js
ivCalculator = require('pokemon-go-iv-calculator');
Then just run
$>browserify temp.js -o ivCalculator.js
As you said, in my <head>
I called it like this
<script src="/scripts/ivCalculator.js"></script>
And finally in my main.js
I did this:
calc = ivCalculator.evaluate(pkmnNumber,CP,HP,Stardust,upgraded);
Thank you @ZeroDragon ! I'll try!