Fine-tune main.js share-functionality