Fix #692: Clean up main detection: Only detect JSApp
Merge pull request #694 from gzm0/clean-main-detection

Fix #692: Clean up main detection: Only detect JSApp