مرحباً، أحاول معرفة كيفية بناء تجربة شريط جانبي بسيطة جداً لعميل، باستخدام بضعة أسطر فقط مليئة بـ قسم مخصص للشريط الجانبي ؛ ولا تعرض أي شيء آخر.
بفضل @Lilly :
I made new sections of my sidebar menu via the
but the old sections was showing up too, and it confuses my members, how do I delete the old ones?
تمكنت من القيام بذلك لإخفاء المجتمع، العلامات، الرسائل و قنوات الدردشة (نعم، ليست قطعة برمجية بسيطة جداً ولكنها لا بأس بها).
.sidebar-section[data-section-name="community"] {
display: none
}
.sidebar-section[data-section-name="tags"] {
display: none
}
.sidebar-section[data-section-name="messages"] {
display: none
}
.sidebar-section[data-section-name="chat-channels"] {
display: none
}
أود أيضاً إخفاء عناصر الدردشات الشخصية، لكنني لم أجد data-section-name المقابل.
آمل ألا يكون قد تم حل هذا في مكان آخر… لقد حاولت القيام بجولة في الأدبيات الداعمة، خاصة القطعة الممتازة من منشور @shyguy ، دون نجاح (على الأقل بالنسبة لشخص مبتدئ مثلي).
sidebarMod
here’s my script for modding the sidebar (first mentioned in the custom sidebar sections topic ).
it uses promises and MutationObserver to watch the sidebar for changes (e.g. from expanding or collapsing) and add/remove stuff in a performant way.
i think i made it flexible enough for most use cases. you can add links (positioned by appending, prepending, or inserting before/after existing links), remove sections, remove links, and even remove ⋮More.
it’s even possible to change th…
شكراً جزيلاً على أي مساعدة أو نصيحة!!
ملاحظة: أنا JB وهذه أول مشاركة لي في هذا المنتدى (بعد بضع سنوات من التواجد، وخاصة في الأشهر الأربعة/الخمسة الأخيرة). شكراً لهذا المجتمع الرائع والبرنامج!
3 إعجابات
Lilly
( Lilly)
3 مايو 2023، 4:19م
2
أهلاً بك @JBM في ميتا.
هل هذا يعمل؟
.sidebar-section[data-section-name="chat-dms"] {
display: none
}
هل تريد فقط إخفاء محادثات الدردشة من الشريط الجانبي أم تريد إيقاف الدردشة تمامًا؟ يمكنك تعطيل إضافة الدردشة في admin-plugins-chat-settings.
3 إعجابات
Lilly
( Lilly)
3 مايو 2023، 4:47م
3
وأعتقد أيضًا أنه يمكنك كتابة كل هذا الرمز بشكل أكثر إيجازًا مثل هذا:
.sidebar-section[data-section-name="community"]، .sidebar-section[data-section-name="tags"]، .sidebar-section[data-section-name="messages"]، .sidebar-section[data-section-name="chat-channels"]، .sidebar-section[data-section-name="chat-dms"] {display: none}
إعجابَين (2)
رائع !
هذا بالضبط ما كنت أبحث عنه (في الواقع، أريد فقط إخفاء المجموعة والدردشة الشخصية من الشريط الجانبي البسيط مع الاحتفاظ بها مرئية في الرأس العلوي فقط)!
شكراً لمساعدتك السريعة (وترحيبك الحار!).
3 إعجابات
system
(system)
تم إغلاقه في
2 يونيو 2023، 5:10م
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.