Store extracted customStyles in uiSettings (#731)
parent
d25eee79f8
commit
29e55ca6b1
|
@ -81,6 +81,7 @@ export type AppViewState = {
|
|||
vimMode: boolean;
|
||||
darkMode: boolean;
|
||||
forcedROMode: boolean;
|
||||
customStyles?: string;
|
||||
};
|
||||
|
||||
// Page navigator mode
|
||||
|
|
|
@ -1087,9 +1087,13 @@ export class Client {
|
|||
console.error("Failed to load custom styles", e);
|
||||
}
|
||||
}
|
||||
document.getElementById("custom-styles")!.innerHTML = accumulatedCSS.join(
|
||||
"\n\n",
|
||||
);
|
||||
const customStylesContent = accumulatedCSS.join("\n\n");
|
||||
this.ui.viewDispatch({
|
||||
type: "set-ui-option",
|
||||
key: "customStyles",
|
||||
value: customStylesContent,
|
||||
});
|
||||
document.getElementById("custom-styles")!.innerHTML = customStylesContent;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue