mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 12:20:20 +01:00
Add crossorigin to html minify script
This commit is contained in:
parent
d10711b794
commit
0afe780128
|
|
@ -45,23 +45,23 @@ const CODE_REPLACE_FUNCTIONS = [
|
||||||
(html) => html.replace(/><\/path>/, "/>"),
|
(html) => html.replace(/><\/path>/, "/>"),
|
||||||
(html) =>
|
(html) =>
|
||||||
html.replace(
|
html.replace(
|
||||||
/<script defer src=\/_next\/static\/chunks\/polyfills-[a-zA-Z0-9-_]+.js nomodule=""><\/script>/,
|
/<script crossorigin="" defer src=\/_next\/static\/chunks\/polyfills-[a-zA-Z0-9-_]+.js nomodule=""><\/script>/,
|
||||||
""
|
""
|
||||||
),
|
),
|
||||||
(html) =>
|
(html) =>
|
||||||
html.replace(
|
html.replace(
|
||||||
/<script defer src=\/_next\/static\/[a-zA-Z0-9-_]+\/_buildManifest.js><\/script>/,
|
/<script crossorigin="" defer src=\/_next\/static\/[a-zA-Z0-9-_]+\/_buildManifest.js><\/script>/,
|
||||||
""
|
""
|
||||||
),
|
),
|
||||||
(html) =>
|
(html) =>
|
||||||
html.replace(
|
html.replace(
|
||||||
/<script defer src=\/_next\/static\/[a-zA-Z0-9-_]+\/_ssgManifest.js><\/script>/,
|
/<script crossorigin="" defer src=\/_next\/static\/[a-zA-Z0-9-_]+\/_ssgManifest.js><\/script>/,
|
||||||
""
|
""
|
||||||
),
|
),
|
||||||
(html) =>
|
(html) =>
|
||||||
html.replace(
|
html.replace(
|
||||||
/<script id=__NEXT_DATA__ type=application\/json>(.*)<\/script>/,
|
/<script crossorigin="" id=__NEXT_DATA__ type=application\/json>(.*)<\/script>/,
|
||||||
`<script id=__NEXT_DATA__ type=application/json>{"buildId":"${commit}","page":"/","props":{}}</script>`
|
`<script crossorigin="" id=__NEXT_DATA__ type=application/json>{"buildId":"${commit}","page":"/","props":{}}</script>`
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user