Here is the main point of making your dapp "Mist ready"
check if mist or web3 object is already defined by mist.
If yes, keep the existing provider info, then re-instantiate web3 using Web3, which comes from your Dapp. Make sure you do not re-define the variable(eg: var web3).
If no, you instantiate provider and define web3 object.
Here is the main point of making your dapp "Mist ready"
mist
orweb3
object is already defined by mist.web3
usingWeb3
, which comes from your Dapp. Make sure you do not re-define the variable(eg:var web3
).web3
object.