File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 if (" error" in result ) {
4141 recapState .setError (result .error )
4242 } else {
43- recapState .setContent (result .content , result .type as " recap" | " blurb" )
43+ recapState .setContent (
44+ result .content ,
45+ result .type as " recap" | " blurb" ,
46+ )
4447 }
4548 }
4649
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ export class ContentManager {
1717 * @param settings - Extension settings
1818 * @returns Processed recap content or error message
1919 */
20- static async fetchRecap (
21- settings : ExtensionSettings ,
22- ) {
20+ static async fetchRecap ( settings : ExtensionSettings ) {
2321 // 1. Find previous chapter URL from DOM
2422 const prevChapterUrlResult = findPreviousChapterUrl ( settings )
2523 if ( "error" in prevChapterUrlResult ) {
@@ -71,9 +69,7 @@ export class ContentManager {
7169 * @param settings - Extension settings
7270 * @returns Processed blurb content or error message
7371 */
74- static async fetchBlurb (
75- settings : ExtensionSettings ,
76- ) {
72+ static async fetchBlurb ( settings : ExtensionSettings ) {
7773 // 1. Find fiction overview URL from DOM
7874 const overviewUrlResult = findFictionOverviewUrl ( settings )
7975 if ( "error" in overviewUrlResult ) {
Original file line number Diff line number Diff line change @@ -287,10 +287,7 @@ export class ContentProcessor {
287287 /**
288288 * Truncates an element node and its children to the specified word count
289289 */
290- private static truncateElementNode (
291- element : HTMLElement ,
292- count : number ,
293- ) {
290+ private static truncateElementNode ( element : HTMLElement , count : number ) {
294291 const newElement = document . createElement ( element . tagName . toLowerCase ( ) )
295292
296293 // Copy all attributes efficiently
Original file line number Diff line number Diff line change 33 * @param url - The URL to fetch content from
44 * @returns Promise resolving to either success data or error message
55 */
6- export async function fetchHtml (
7- url : string | URL | Request ,
8- ) {
6+ export async function fetchHtml ( url : string | URL | Request ) {
97 try {
108 const response = await fetch ( url )
119
Original file line number Diff line number Diff line change @@ -19,22 +19,24 @@ export const settingsStore = storage.defineItem<ExtensionSettings>(
1919 const migrated = {
2020 ...oldSettings ,
2121 enableJump : oldSettings . smoothScroll === true ,
22- scrollBehavior : oldSettings . smoothScroll ? "smooth" : "auto" ,
22+ scrollBehavior : oldSettings . smoothScroll
23+ ? "smooth"
24+ : "auto" ,
2325 } as ExtensionSettings
2426
2527 // Remove the old property
2628 delete ( migrated as any ) . smoothScroll
2729
2830 console . log ( "WXT Migration v1→v2: smoothScroll ->" , {
2931 enableJump : migrated . enableJump ,
30- scrollBehavior : migrated . scrollBehavior
32+ scrollBehavior : migrated . scrollBehavior ,
3133 } )
3234
3335 return migrated
3436 }
3537 return oldSettings as ExtensionSettings
36- }
37- }
38+ } ,
39+ } ,
3840 } ,
3941)
4042
@@ -59,9 +61,7 @@ export async function updateSettings(
5961/**
6062 * Set complete settings (replaces old settings entirely)
6163 */
62- export async function setSettings (
63- settings : Partial < ExtensionSettings > ,
64- ) {
64+ export async function setSettings ( settings : Partial < ExtensionSettings > ) {
6565 const newSettings = { ...getDefaults ( ) , ...settings }
6666 await settingsStore . setValue ( newSettings )
6767}
You can’t perform that action at this time.
0 commit comments