Evite le flash HTML avant le chargement du CSS
This commit is contained in:
@@ -51,10 +51,8 @@
|
||||
return `${assetUrl.pathname}${assetUrl.search}${assetUrl.hash}`;
|
||||
};
|
||||
|
||||
const stylesheet = document.createElement("link");
|
||||
stylesheet.rel = "stylesheet";
|
||||
stylesheet.href = window.__CHESSCUBING_ASSET_URL__("styles.css");
|
||||
document.head.append(stylesheet);
|
||||
const stylesheetHref = window.__CHESSCUBING_ASSET_URL__("styles.css");
|
||||
document.write(`<link rel="stylesheet" href="${stylesheetHref}" />`);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -51,10 +51,8 @@
|
||||
return `${assetUrl.pathname}${assetUrl.search}${assetUrl.hash}`;
|
||||
};
|
||||
|
||||
const stylesheet = document.createElement("link");
|
||||
stylesheet.rel = "stylesheet";
|
||||
stylesheet.href = window.__CHESSCUBING_ASSET_URL__("styles.css");
|
||||
document.head.append(stylesheet);
|
||||
const stylesheetHref = window.__CHESSCUBING_ASSET_URL__("styles.css");
|
||||
document.write(`<link rel="stylesheet" href="${stylesheetHref}" />`);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -51,10 +51,8 @@
|
||||
return `${assetUrl.pathname}${assetUrl.search}${assetUrl.hash}`;
|
||||
};
|
||||
|
||||
const stylesheet = document.createElement("link");
|
||||
stylesheet.rel = "stylesheet";
|
||||
stylesheet.href = window.__CHESSCUBING_ASSET_URL__("styles.css");
|
||||
document.head.append(stylesheet);
|
||||
const stylesheetHref = window.__CHESSCUBING_ASSET_URL__("styles.css");
|
||||
document.write(`<link rel="stylesheet" href="${stylesheetHref}" />`);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user