Skip to content

Commit

Permalink
Merge pull request #239 from VampireChicken12/dev
Browse files Browse the repository at this point in the history
fix(custom css): page CSS didn't update when editor css changed
  • Loading branch information
VampireChicken12 authored Jan 5, 2024
2 parents 11f3eee + 443edd8 commit 9311850
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/features/customCSS/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export function updateCustomCSS({ custom_css_code }: Pick<configuration, "custom
const customCSSStyleElement = document.querySelector<HTMLStyleElement>("#yte-custom-css");
// Check if the custom CSS style element exists
if (!customCSSStyleElement) return;
// Update the custom CSS style element
customCSSStyleElement.textContent = custom_css_code;
customCSSStyleElement.replaceWith(createCustomCSSElement({ custom_css_code }));
}
export function createCustomCSSElement({ custom_css_code }: Pick<configuration, "custom_css_code">) {
// Create the custom CSS style element
Expand Down

0 comments on commit 9311850

Please sign in to comment.