diff --git a/README.md b/README.md index 9fbe140..d13b6eb 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ Les contributions sont les bienvenues ! Voici comment contribuer : Attention, merci de respecter les guidelines de contribution, sinon votre PR sera refusée. +⚒️ **Serveur de développement BBB : https://bbb.theovilain.com/** + ### 📋 Guidelines de contribution #### Style de code diff --git a/src/content.ts b/src/content.ts index fa1d3ef..9a13d00 100644 --- a/src/content.ts +++ b/src/content.ts @@ -24,7 +24,6 @@ const app = { checkNewMessages(); setupMentions(); setupReactions(); - setupModerator(); console.log('[WWSNB] Modules initialized successfully'); }, 1000); diff --git a/src/modules/mentions.ts b/src/modules/mentions.ts index f5464da..4fd4be6 100644 --- a/src/modules/mentions.ts +++ b/src/modules/mentions.ts @@ -18,7 +18,7 @@ document.addEventListener('click', (e) => { /** * Initialize the mentions system by setting up event listeners */ -function setupMentions() { +export function setupMentions() { console.log('[WWSNB] Initializing user mentions module'); // Remove any existing event listeners to prevent duplicates diff --git a/src/modules/mentions/mention.module.ts b/src/modules/mentions/mention.module.ts new file mode 100644 index 0000000..72de068 --- /dev/null +++ b/src/modules/mentions/mention.module.ts @@ -0,0 +1,5 @@ +export function addClassMention(message: HTMLElement) { + // Add special styling class + const messageContainer = message.closest('.sc-leYdVB'); + messageContainer && !messageContainer.classList.contains('mention-highlight') && messageContainer.classList.add('mention-highlight'); +} \ No newline at end of file diff --git a/src/utils/observer.ts b/src/utils/observer.ts index 5ddd1d2..7d6e924 100644 --- a/src/utils/observer.ts +++ b/src/utils/observer.ts @@ -1,7 +1,7 @@ -import { addClassMention } from "@/modules/mentions"; +import { addClassMention } from "@/modules/mentions/mention.module"; +import { getActualUserName } from "@/modules/users/user.module"; import { addClassModerator } from "@/modules/moderator"; import { addClassQuestion } from "@/modules/questions"; -import { getActualUserName } from "@/modules/users/user.module"; export const observer = new MutationObserver((mutations) => { for (const mutation of mutations) {