Adrià Vilanova Martínez | d7951b2 | 2024-05-25 22:13:32 +0200 | [diff] [blame] | 1 | import {injectStylesheet} from '../../common/contentScriptsUtils'; |
Adrià Vilanova Martínez | b523be9 | 2024-05-25 19:14:19 +0200 | [diff] [blame] | 2 | import {getOptions} from '../../common/options/optionsUtils.js'; |
Adrià Vilanova Martínez | 3465e77 | 2021-07-11 19:18:41 +0200 | [diff] [blame] | 3 | |
Adrià Vilanova Martínez | 72a4ea4 | 2024-02-09 22:35:32 +0100 | [diff] [blame] | 4 | import FlattenThreadsReplyActionHandler from './flattenThreads/replyActionHandler.js'; |
Adrià Vilanova | 61f782f | 2024-05-31 22:57:24 +0000 | [diff] [blame] | 5 | import ThreadPageDesignWarning from './threadPageDesignWarning.js'; |
avm99963 | b6f68b6 | 2021-08-12 23:13:06 +0200 | [diff] [blame] | 6 | |
Adrià Vilanova Martínez | d269c62 | 2021-09-04 18:35:55 +0200 | [diff] [blame] | 7 | getOptions(null).then(options => { |
Adrià Vilanova | 61f782f | 2024-05-31 22:57:24 +0000 | [diff] [blame] | 8 | // 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ínez | a2f7951 | 2022-07-10 15:32:32 +0200 | [diff] [blame] | 12 | 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ínez | 72a4ea4 | 2024-02-09 22:35:32 +0100 | [diff] [blame] | 16 | |
Adrià Vilanova Martínez | 66836fd | 2024-05-04 22:43:06 +0200 | [diff] [blame] | 17 | const flattenThreadsReplyActionHandler = |
| 18 | new FlattenThreadsReplyActionHandler(options); |
Adrià Vilanova Martínez | 72a4ea4 | 2024-02-09 22:35:32 +0100 | [diff] [blame] | 19 | flattenThreadsReplyActionHandler.handleIfApplicable(); |
avm99963 | 6d9c5fe | 2019-06-04 00:35:53 +0200 | [diff] [blame] | 20 | }); |