blob: b2ad6152cc4d90ef22dcd653910eb2822cec59fb [file] [log] [blame]
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02001import {injectScript, injectStyles, injectStylesheet} from '../../common/contentScriptsUtils.js';
Adrià Vilanova Martínez4d599252023-02-04 20:54:54 +01002import {getOptions} from '../../common/optionsUtils.js';
Adrià Vilanova Martínez825888a2023-07-23 01:53:48 +02003import XHRProxyKillSwitchHandler from '../../xhrInterceptor/killSwitchHandler.js';
Adrià Vilanova Martínez1f652522021-10-14 00:23:23 +02004import {injectPreviousPostsLinksUnifiedProfileIfEnabled} from '../utilsCommon/unifiedProfiles.js';
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02005
Adrià Vilanova Martínez27c69962021-07-17 23:32:51 +02006import AvatarsHandler from './avatars.js';
Adrià Vilanova Martínez462280f2021-08-07 22:59:02 +02007import {batchLock} from './batchLock.js';
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02008import {injectDarkModeButton, isDarkThemeOn} from './darkMode.js';
Adrià Vilanova Martínezeebc0ac2022-01-05 14:45:53 +01009// #!if ['chromium', 'chromium_mv3'].includes(browser_target)
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +020010import {applyDragAndDropFixIfEnabled} from './dragAndDropFix.js';
Adrià Vilanova Martínezeebc0ac2022-01-05 14:45:53 +010011// #!endif
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +010012import {default as FlattenThreads, kMatchingSelectors as kFlattenThreadMatchingSelectors} from './flattenThreads/flattenThreads.js';
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +010013import InfiniteScroll from './infiniteScroll.js';
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +010014import {kRepliesSectionSelector} from './threadToolbar/constants.js';
15import ThreadToolbar from './threadToolbar/threadToolbar.js';
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020016import {unifiedProfilesFix} from './unifiedProfiles.js';
Adrià Vilanova Martínez2788d122022-10-10 22:06:25 +020017import Workflows from './workflows/workflows.js';
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020018
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +010019var mutationObserver, options, avatars, infiniteScroll, workflows,
Adrià Vilanova Martínez412b7582022-12-30 01:35:30 +010020 threadToolbar, flattenThreads;
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020021
22const watchedNodesSelectors = [
23 // App container (used to set up the intersection observer and inject the dark
24 // mode button)
25 'ec-app',
26
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +010027 // Scrollable content (used for the intersection observer)
28 '.scrollable-content',
29
30 // Load more bar and buttons
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020031 '.load-more-bar',
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +010032 '.scTailwindThreadMorebuttonbutton',
Adrià Vilanova Martínez88854972022-08-28 11:57:12 +020033 '.scTailwindThreadMessagegapbutton',
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020034
Adrià Vilanova Martínez7e8796c2022-01-23 21:46:46 +010035 // User profile card inside ec-unified-user
36 'ec-unified-user .scTailwindUser_profileUsercardmain',
37
Adrià Vilanova Martínez531cd072021-12-05 20:15:43 +010038 // Username span/editor inside ec-unified-user (user profile view)
Adrià Vilanova Martínez1f652522021-10-14 00:23:23 +020039 'ec-unified-user .scTailwindUser_profileUsercarddetails',
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020040
41 // Rich text editor
42 'ec-movable-dialog',
43 'ec-rich-text-editor',
44
45 // Read/unread bulk action in the list of thread, for the batch lock feature
46 'ec-bulk-actions material-button[debugid="mark-read-button"]',
47 'ec-bulk-actions material-button[debugid="mark-unread-button"]',
48
Adrià Vilanova Martínez854cb912022-02-02 16:18:23 +010049 // Thread list items (used to inject the avatars and extra info)
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020050 'li',
51
Adrià Vilanova Martínez854cb912022-02-02 16:18:23 +010052 // Thread list item toolbelt (used for the extra info feature)
53 'ec-thread-summary .main .toolbelt',
54
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020055 // Thread list (used for the autorefresh feature)
56 'ec-thread-list',
57
58 // Unified profile iframe
59 'iframe',
Adrià Vilanova Martínez74a25202022-01-23 23:36:58 +010060
Adrià Vilanova Martínez46ecb982024-01-30 22:02:17 +010061 // Canned response tags (for the "import CR" popup for the workflows feature)
Adrià Vilanova Martínez6e4a68d2022-01-24 21:44:32 +010062 'ec-canned-response-row .tags',
Adrià Vilanova Martínez6e4a68d2022-01-24 21:44:32 +010063
Adrià Vilanova Martínez09b3bdb2022-02-05 00:15:05 +010064 // Question state chips container (for the extra info feature)
Adrià Vilanova Martínez19f6a652023-11-15 19:38:50 +010065 'sc-tailwind-thread-question-question-card sc-tailwind-thread-question-state-chips',
Adrià Vilanova Martínez6e4a68d2022-01-24 21:44:32 +010066
67 // Replies (for the extra info feature)
Adrià Vilanova Martínez19f6a652023-11-15 19:38:50 +010068 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-message-card',
Adrià Vilanova Martínez4f56d562022-01-26 00:23:27 +010069
Adrià Vilanova Martínez80f1c732023-11-16 00:52:56 +010070 // Comments (for the extra info feature)
71 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-comment-card',
72
Adrià Vilanova Martínez4f56d562022-01-26 00:23:27 +010073 // User activity chart (for the per-forum stats feature)
74 'ec-unified-user .scTailwindUser_profileUserprofilesection ' +
75 'sc-tailwind-shared-activity-chart',
Adrià Vilanova Martínez5a8055b2022-09-29 13:05:19 +020076
77 // Thread page main content
78 'ec-thread > .page > .material-content > div[role="list"]',
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +010079
80 // Thread page reply section (for the thread page toolbar)
81 kRepliesSectionSelector,
Adrià Vilanova Martínez412b7582022-12-30 01:35:30 +010082
83 // Reply payload (for the flatten threads UI)
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +010084 ...kFlattenThreadMatchingSelectors,
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020085];
86
87function handleCandidateNode(node) {
88 if (typeof node.classList !== 'undefined') {
89 if (('tagName' in node) && node.tagName == 'EC-APP') {
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +010090 infiniteScroll.setUpIntersectionObserver(node, false);
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020091
92 // Inject the dark mode button
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +020093 // TODO(avm99963): make this feature dynamic.
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +020094 if (options.ccdarktheme && options.ccdarktheme_mode == 'switch') {
95 var rightControl = node.querySelector('header .right-control');
96 if (rightControl !== null)
97 injectDarkModeButton(rightControl, options.ccdarktheme_switch_status);
98 }
99 }
100
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +0100101 // To set up infinite scroll
102 if (node.classList.contains('scrollable-content')) {
103 infiniteScroll.setUpIntersectionObserver(node, true);
104 }
105
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200106 // Start the intersectionObserver for the "load more"/"load all" buttons
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200107 // inside a thread if the option is currently enabled.
108 if (node.classList.contains('load-more-bar')) {
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +0100109 infiniteScroll.observeLoadMoreBar(node);
110 }
Adrià Vilanova Martínez88854972022-08-28 11:57:12 +0200111 if (node.classList.contains('scTailwindThreadMorebuttonbutton') ||
112 node.classList.contains('scTailwindThreadMessagegapbutton')) {
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +0100113 infiniteScroll.observeLoadMoreInteropBtn(node);
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200114 }
115
Adrià Vilanova Martínez7e8796c2022-01-23 21:46:46 +0100116 // Show additional details in the profile view.
117 if (node.matches('ec-unified-user .scTailwindUser_profileUsercardmain')) {
Adrià Vilanova Martínez0d92a0c2023-11-06 01:37:20 +0100118 window.TWPTExtraInfo.injectAbuseChipsAtProfileIfEnabled(node);
Adrià Vilanova Martínez7e8796c2022-01-23 21:46:46 +0100119 }
120
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200121 // Show the "previous posts" links if the option is currently enabled.
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200122 // Here we're selecting the 'ec-user > div' element (unique child)
Adrià Vilanova Martínez1f652522021-10-14 00:23:23 +0200123 if (node.matches(
124 'ec-unified-user .scTailwindUser_profileUsercarddetails')) {
125 injectPreviousPostsLinksUnifiedProfileIfEnabled(
126 /* isCommunityConsole = */ true);
127 }
128
Adrià Vilanova Martínezeebc0ac2022-01-05 14:45:53 +0100129 // #!if ['chromium', 'chromium_mv3'].includes(browser_target)
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200130 // Fix the drag&drop issue with the rich text editor if the option is
131 // currently enabled.
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200132 //
133 // We target both tags because in different contexts different
134 // elements containing the text editor get added to the DOM structure.
135 // Sometimes it's a EC-MOVABLE-DIALOG which already contains the
136 // EC-RICH-TEXT-EDITOR, and sometimes it's the EC-RICH-TEXT-EDITOR
137 // directly.
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200138 if (('tagName' in node) &&
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200139 (node.tagName == 'EC-MOVABLE-DIALOG' ||
140 node.tagName == 'EC-RICH-TEXT-EDITOR')) {
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200141 applyDragAndDropFixIfEnabled(node);
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200142 }
Adrià Vilanova Martínezeebc0ac2022-01-05 14:45:53 +0100143 // #!endif
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200144
Adrià Vilanova Martínez2788d122022-10-10 22:06:25 +0200145 // Inject the worflows menu in the thread list if the option is currently
146 // enabled.
147 if (workflows.shouldAddThreadListBtn(node)) {
148 workflows.addThreadListBtnIfEnabled(node);
149 }
150
Adrià Vilanova Martínezb06c13d2022-06-20 17:30:14 +0000151 // Inject the batch lock button in the thread list if the option is
152 // currently enabled.
Adrià Vilanova Martínez4107b5e2022-10-09 23:11:11 +0200153 if (batchLock.shouldAddButton(node)) {
Adrià Vilanova Martínezb06c13d2022-06-20 17:30:14 +0000154 batchLock.addButtonIfEnabled(node);
155 }
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200156
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200157 // Inject avatar links to threads in the thread list. injectIfEnabled is
158 // responsible of determining whether it should run or not depending on its
159 // current setting.
Adrià Vilanova Martínez854cb912022-02-02 16:18:23 +0100160 //
161 // Also, inject extra info in the thread list.
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200162 if (('tagName' in node) && (node.tagName == 'LI') &&
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200163 node.querySelector('ec-thread-summary') !== null) {
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200164 avatars.injectIfEnabled(node);
Adrià Vilanova Martínez854cb912022-02-02 16:18:23 +0100165 window.TWPTExtraInfo.injectAtThreadListIfEnabled(node);
166 }
167
168 // Inject extra info in the toolbelt of an expanded thread list item.
169 if (node.matches('ec-thread-summary .main .toolbelt')) {
170 window.TWPTExtraInfo.injectAtExpandedThreadListIfEnabled(node);
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200171 }
172
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200173 // Set up the autorefresh list feature. The setUp function is responsible
174 // of determining whether it should run or not depending on the current
175 // setting.
176 if (('tagName' in node) && node.tagName == 'EC-THREAD-LIST') {
avm99963fd222672021-08-12 23:23:01 +0200177 window.TWPTAutoRefresh.setUp();
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200178 }
179
180 // Redirect unified profile iframe to dark version if applicable
181 if (node.tagName == 'IFRAME' && isDarkThemeOn(options) &&
182 unifiedProfilesFix.checkIframe(node)) {
183 unifiedProfilesFix.fixIframe(node);
184 }
Adrià Vilanova Martínez74a25202022-01-23 23:36:58 +0100185
Adrià Vilanova Martínez46ecb982024-01-30 22:02:17 +0100186 // Add the "import" button in the canned responses view for the workflows
187 // feature if applicable.
Adrià Vilanova Martínez74a25202022-01-23 23:36:58 +0100188 if (node.matches('ec-canned-response-row .tags')) {
Adrià Vilanova Martíneze0d65f22022-11-06 18:49:35 +0100189 window.TWPTWorkflowsImport.addButtonIfEnabled(node);
Adrià Vilanova Martínez74a25202022-01-23 23:36:58 +0100190 }
Adrià Vilanova Martínez6e4a68d2022-01-24 21:44:32 +0100191
192 // Show additional details in the thread view.
Adrià Vilanova Martínez19f6a652023-11-15 19:38:50 +0100193 if (node.matches(
194 'sc-tailwind-thread-question-question-card sc-tailwind-thread-question-state-chips')) {
Adrià Vilanova Martínez09b3bdb2022-02-05 00:15:05 +0100195 window.TWPTExtraInfo.injectAtQuestionIfEnabled(node);
Adrià Vilanova Martínez6e4a68d2022-01-24 21:44:32 +0100196 }
Adrià Vilanova Martínez19f6a652023-11-15 19:38:50 +0100197 if (node.matches(
198 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-message-card')) {
Adrià Vilanova Martínez80f1c732023-11-16 00:52:56 +0100199 window.TWPTExtraInfo.injectAtReplyIfEnabled(node);
200 }
201
202 if (node.matches(
203 'sc-tailwind-thread-message-message-list sc-tailwind-thread-message-comment-card')) {
204 window.TWPTExtraInfo.injectAtCommentIfEnabled(node);
Adrià Vilanova Martínez74a25202022-01-23 23:36:58 +0100205 }
Adrià Vilanova Martínez4f56d562022-01-26 00:23:27 +0100206
207 // Inject per-forum stats section in the user profile
208 if (node.matches(
209 'ec-unified-user .scTailwindUser_profileUserprofilesection ' +
210 'sc-tailwind-shared-activity-chart')) {
211 window.TWPTExtraInfo.injectPerForumStatsIfEnabled(node);
212 }
Adrià Vilanova Martínez5a8055b2022-09-29 13:05:19 +0200213
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +0100214 // Inject old thread page design warning if applicable
Adrià Vilanova Martínezd2344c42022-09-30 13:14:29 +0200215 if (node.matches(
216 'ec-thread > .page > .material-content > div[role="list"]')) {
217 window.TWPTThreadPageDesignWarning.injectWarningIfApplicable(node);
Adrià Vilanova Martínez5a8055b2022-09-29 13:05:19 +0200218 }
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +0100219
220 // Inject thread toolbar
221 if (threadToolbar.shouldInject(node)) {
222 threadToolbar.injectIfApplicable(node);
223 }
Adrià Vilanova Martínez412b7582022-12-30 01:35:30 +0100224
225 // Inject parent reply quote
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100226 if (flattenThreads.shouldInjectQuote(node)) {
227 flattenThreads.injectQuoteIfApplicable(node);
228 }
229
230 // Inject reply button in non-nested view
231 if (flattenThreads.shouldInjectReplyBtn(node)) {
232 flattenThreads.injectReplyBtnIfApplicable(node);
Adrià Vilanova Martínez412b7582022-12-30 01:35:30 +0100233 }
Adrià Vilanova Martínez4d599252023-02-04 20:54:54 +0100234
235 // Delete additional info in the edit message box
236 if (flattenThreads.isAdditionalInfoElement(node)) {
237 flattenThreads.deleteAdditionalInfoElementIfApplicable(node);
238 }
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200239 }
240}
241
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100242function handleRemovedNode(mutation, node) {
243 if (!('tagName' in node)) return;
244
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200245 // Remove snackbar when exiting thread list view
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100246 if (node.tagName == 'EC-THREAD-LIST') {
avm99963fd222672021-08-12 23:23:01 +0200247 window.TWPTAutoRefresh.hideUpdatePrompt();
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200248 }
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100249
250 // Readd reply button when the Community Console removes it
251 if (node.tagName == 'TWPT-FLATTEN-THREAD-REPLY-BUTTON') {
252 flattenThreads.injectReplyBtn(
253 mutation.target, JSON.parse(node.getAttribute('extraInfo')));
254 }
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200255}
256
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100257function mutationCallback(mutationList) {
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200258 mutationList.forEach((mutation) => {
259 if (mutation.type == 'childList') {
260 mutation.addedNodes.forEach(function(node) {
261 handleCandidateNode(node);
262 });
263
264 mutation.removedNodes.forEach(function(node) {
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100265 handleRemovedNode(mutation, node);
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200266 });
267 }
268 });
269}
270
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200271var observerOptions = {
272 childList: true,
273 subtree: true,
274};
275
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200276getOptions(null).then(items => {
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200277 options = items;
278
Adrià Vilanova Martínez27c69962021-07-17 23:32:51 +0200279 // Initialize classes needed by the mutation observer
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200280 avatars = new AvatarsHandler();
Adrià Vilanova Martíneza7ae3db2022-01-28 11:57:27 +0100281 infiniteScroll = new InfiniteScroll();
Adrià Vilanova Martínez2788d122022-10-10 22:06:25 +0200282 workflows = new Workflows();
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +0100283 threadToolbar = new ThreadToolbar();
Adrià Vilanova Martínez412b7582022-12-30 01:35:30 +0100284 flattenThreads = new FlattenThreads();
Adrià Vilanova Martínez27c69962021-07-17 23:32:51 +0200285
Adrià Vilanova Martíneze0d65f22022-11-06 18:49:35 +0100286 // autoRefresh, extraInfo, threadPageDesignWarning and workflowsImport are
287 // initialized in start.js
avm99963d3f4ac02021-08-12 18:36:58 +0200288
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200289 // Before starting the mutation Observer, check whether we missed any
290 // mutations by manually checking whether some watched nodes already
291 // exist.
292 var cssSelectors = watchedNodesSelectors.join(',');
293 document.querySelectorAll(cssSelectors)
294 .forEach(node => handleCandidateNode(node));
295
296 mutationObserver = new MutationObserver(mutationCallback);
297 mutationObserver.observe(document.body, observerOptions);
298
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200299 // TODO(avm99963): The following features are not dynamic. Make them be.
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200300 if (options.fixedtoolbar) {
301 injectStyles(
Adrià Vilanova Martínez401bc652024-02-26 04:03:48 +0100302 'ec-bulk-actions{position: sticky; top: 0; background: var(--TWPT-primary-background, #fff); z-index: 99;}');
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200303 }
304
305 if (options.increasecontrast) {
306 injectStyles(
307 '.thread-summary.read:not(.checked){background: var(--TWPT-thread-read-background, #ecedee)!important;}');
308 }
309
310 if (options.stickysidebarheaders) {
311 injectStyles(
312 'material-drawer .main-header{background: var(--TWPT-drawer-background, #fff)!important; position: sticky; top: 0; z-index: 1;}');
313 }
314
315 if (options.enhancedannouncementsdot) {
316 injectStylesheet(
317 chrome.runtime.getURL('css/enhanced_announcements_dot.css'));
318 }
319
320 if (options.repositionexpandthread) {
Adrià Vilanova Martínez27c69962021-07-17 23:32:51 +0200321 injectStylesheet(chrome.runtime.getURL('css/reposition_expand_thread.css'));
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200322 }
323
Adrià Vilanova Martínez9d27c212021-12-05 13:54:10 +0100324 if (options.imagemaxheight) {
325 injectStylesheet(chrome.runtime.getURL('css/image_max_height.css'));
326 }
327
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200328 if (options.ccforcehidedrawer) {
329 var drawer = document.querySelector('material-drawer');
330 if (drawer !== null && drawer.classList.contains('mat-drawer-expanded')) {
331 document.querySelector('.material-drawer-button').click();
332 }
333 }
334
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +0200335 // Batch lock
336 injectScript(chrome.runtime.getURL('batchLockInject.bundle.js'));
337 injectStylesheet(chrome.runtime.getURL('css/batchlock_inject.css'));
338 // Thread list avatars
339 injectStylesheet(chrome.runtime.getURL('css/thread_list_avatars.css'));
340 // Auto refresh list
341 injectStylesheet(chrome.runtime.getURL('css/autorefresh_list.css'));
Adrià Vilanova Martínez7e8796c2022-01-23 21:46:46 +0100342 // Extra info
343 injectStylesheet(chrome.runtime.getURL('css/extrainfo.css'));
avm9996337601bc2022-02-21 10:36:45 +0100344 injectStylesheet(chrome.runtime.getURL('css/extrainfo_perforumstats.css'));
Adrià Vilanova Martínez2d9be8d2022-12-28 00:50:14 +0100345 // Workflows, Thread toolbar
346 injectScript(chrome.runtime.getURL('litComponentsInject.bundle.js'));
347 // Thread toolbar
348 injectStylesheet(chrome.runtime.getURL('css/thread_toolbar.css'));
Adrià Vilanova Martínez115e3d82023-01-10 21:50:06 +0100349 // Flatten threads
350 injectStylesheet(chrome.runtime.getURL('css/flatten_threads.css'));
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +0200351});
Adrià Vilanova Martínez825888a2023-07-23 01:53:48 +0200352
353new XHRProxyKillSwitchHandler();