كيفية إدراج سكريبت JavaScript قبل وسم </body>

يمكنك استخدام واجهة برمجة تطبيقات المكونات الإضافية لـ discourse
You can use the discourse plugin api.

<script type="text/discourse-plugin" version="0.8">
api.decorateCookedElement((elem, helper) => {
    const player = new Plyr('video');
}, {id: "beauitfy-video"})
</script>

آه، أنت تحتاج فقط إلى تحميل مرة واحدة؟ إذن انسَ ما قلته
Ah, you only need to load once? Then pretend I didn’t say it

لا فرق. أليس لديك مستمع حدث؟
It makes no difference. Don’t you have an eventListener?