Skip to content

Commit 4581f81

Browse files
committed
cleanup
1 parent 506d2ea commit 4581f81

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/content.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let sitesToExclude = [
2525
'localhost',
2626
'aws.amazon.com',
2727
'discord.com', // Uses Slate.js framework - controlled editor that breaks with DOM manipulation
28-
'teams.microsoft.com', // Causes UI freezing - likely uses controlled editor framework
28+
'teams.microsoft.com', // Uses CKEditor 5 - causes severe UI freezing and cursor issues despite optimization attempts
2929
'web.whatsapp.com', // Uses Lexical framework
3030
'messenger.com', // Uses Lexical framework
3131
'facebook.com', // Uses Lexical framework
@@ -253,7 +253,8 @@ function observeHtmlBody() {
253253
const inputTags = ["input[type='text']", 'textarea'];
254254

255255
const lastUpdatedText = '';
256-
const observer = new MutationObserver(function (mutations) {
256+
257+
const processMutations = function (mutations) {
257258
let characterDataMutations = [];
258259

259260
mutations.forEach(function (mutation) {
@@ -332,6 +333,10 @@ function observeHtmlBody() {
332333

333334
characterDataMutations = unique(characterDataMutations);
334335
characterDataMutations.forEach((element) => capitaliseText(element));
336+
};
337+
338+
const observer = new MutationObserver(function (mutations) {
339+
processMutations(mutations);
335340
});
336341

337342
const config = {

0 commit comments

Comments
 (0)