blob: 64bc2a064bde31e1d81590d54662f30006562533 [file] [log] [blame]
Adrià Vilanova Martínezd7951b22024-05-25 22:13:32 +02001import {injectStylesheet} from '../../common/contentScriptsUtils';
Adrià Vilanova Martínezb523be92024-05-25 19:14:19 +02002import {getOptions} from '../../common/options/optionsUtils.js';
Adrià Vilanova Martínez3465e772021-07-11 19:18:41 +02003
Adrià Vilanova Martínez72a4ea42024-02-09 22:35:32 +01004import FlattenThreadsReplyActionHandler from './flattenThreads/replyActionHandler.js';
Adrià Vilanova61f782f2024-05-31 22:57:24 +00005import ThreadPageDesignWarning from './threadPageDesignWarning.js';
avm99963b6f68b62021-08-12 23:13:06 +02006
Adrià Vilanova Martínezd269c622021-09-04 18:35:55 +02007getOptions(null).then(options => {
Adrià Vilanova61f782f2024-05-31 22:57:24 +00008 // Initialized here instead of in main.js so the first event is received if it
9 // happens when the page loads.
10 window.TWPTThreadPageDesignWarning = new ThreadPageDesignWarning();
11
Adrià Vilanova Martíneza2f79512022-07-10 15:32:32 +020012 if (options.uispacing) {
13 injectStylesheet(chrome.runtime.getURL('css/ui_spacing/shared.css'));
14 injectStylesheet(chrome.runtime.getURL('css/ui_spacing/console.css'));
15 }
Adrià Vilanova Martínez72a4ea42024-02-09 22:35:32 +010016
Adrià Vilanova Martínez66836fd2024-05-04 22:43:06 +020017 const flattenThreadsReplyActionHandler =
18 new FlattenThreadsReplyActionHandler(options);
Adrià Vilanova Martínez72a4ea42024-02-09 22:35:32 +010019 flattenThreadsReplyActionHandler.handleIfApplicable();
avm999636d9c5fe2019-06-04 00:35:53 +020020});