reverted main.js panel code. new code was failing on mobile