im such a fat chud
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
558df133e1
commit
b8818e73c9
1 changed files with 9 additions and 1 deletions
|
|
@ -416,7 +416,15 @@ export class ThemeStore {
|
|||
const customUrl = urlMatch[1].trim().replace(/['"]/g, '');
|
||||
console.log(`Applying custom font URL: ${customUrl}`);
|
||||
|
||||
if (customUrl.match(/\.(css)$/i) || customUrl.includes('fonts.googleapis.com')) {
|
||||
let isGoogleFontsHost = false;
|
||||
try {
|
||||
const parsedUrl = new URL(customUrl, window.location.href);
|
||||
isGoogleFontsHost = parsedUrl.hostname === 'fonts.googleapis.com';
|
||||
} catch (_e) {
|
||||
isGoogleFontsHost = false;
|
||||
}
|
||||
|
||||
if (customUrl.match(/\.(css)$/i) || isGoogleFontsHost) {
|
||||
if (!link) {
|
||||
link = document.createElement('link');
|
||||
link.id = FONT_LINK_ID;
|
||||
|
|
|
|||
Loading…
Reference in a new issue