Refactor sample to be able to use clickonce.js independently