*facepalm*
Thanks a lot, that was exactly the problem. I inserted the wp_footer hook:
wp_footer();
in my theme’s footer.php just before the closing </body> tag and erverything is working smoothly now. panel.js is added to the footer as it is supposed to without any modifications to the plugin code.