يتطلب هذا المزيد من التخصيص لأنه محظور في عنصر واجهة المستخدم home-logo هنا:
لذلك ستحتاج إلى استخدام changeWidgetSetting لتعيين عنوان URL، ثم reopenWidget لإضافة _blank وتجاوز سلوك النقر الافتراضي الذي يمنعه من الفتح في نافذة جديدة.
<script type="text/discourse-plugin" version="0.8">
const { h } = require("virtual-dom");
api.changeWidgetSetting('home-logo', 'href', 'https://discourse.org');
api.reopenWidget("home-logo", {
html() {
return h(
"a",
{ attributes: { href: this.href(), "data-auto-route": true, "target": "_blank" } },
this.logo()
);
},
click(e) {
return;
},
});
</script>