use console.log instead of alert, fix #1282

At least fix the superficial part of #1282, not showing an alert. What’s the original issue though?

Please review @butonic @Kondou-ger