mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
misc: add IDE language annotation comments (#7678)
add IDE language annotations
This commit is contained in:
parent
9ce7d11309
commit
cebe4840aa
2 changed files with 5 additions and 1 deletions
|
@ -29,7 +29,9 @@ const ThemeStorageKey = 'theme';
|
|||
const noFlashColorMode = ({
|
||||
defaultMode,
|
||||
respectPrefersColorScheme,
|
||||
}: ThemeConfig['colorMode']) => `(function() {
|
||||
}: ThemeConfig['colorMode']) =>
|
||||
/* language=js */
|
||||
`(function() {
|
||||
var defaultMode = '${defaultMode}';
|
||||
var respectPrefersColorScheme = ${respectPrefersColorScheme};
|
||||
|
||||
|
@ -76,6 +78,7 @@ const AnnouncementBarDismissDataAttribute =
|
|||
// We always render the announcement bar html on the server, to prevent layout
|
||||
// shifts on React hydration. The theme can use CSS + the data attribute to hide
|
||||
// the announcement bar asap (before React hydration)
|
||||
/* language=js */
|
||||
const AnnouncementBarInlineJavaScript = `
|
||||
(function() {
|
||||
function isDismissed() {
|
||||
|
|
|
@ -43,6 +43,7 @@ function createInlineHtmlBanner(baseUrl: string) {
|
|||
|
||||
// Needs to work for older browsers!
|
||||
function createInlineScript(baseUrl: string) {
|
||||
/* language=js */
|
||||
return `
|
||||
window['${InsertBannerWindowAttribute}'] = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue