Skip to content

Commit

Permalink
Fix/content (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mimouss56 authored Nov 11, 2024
1 parent 970c2b1 commit 7cdfe11
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const app = {
checkNewMessages();
setupMentions();
setupReactions();
setupModerator();
console.log('[WWSNB] Modules initialized successfully');
}, 1000);

Expand Down
2 changes: 1 addition & 1 deletion src/modules/mentions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/modules/mentions/mention.module.ts
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions src/utils/observer.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 7cdfe11

Please sign in to comment.