mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Remove imports from embedded styles
This commit is contained in:
parent
00fc40408a
commit
630111c737
@ -471,6 +471,9 @@ export function decodeStyleTags(text) {
|
|||||||
const rules = ast?.stylesheet?.rules;
|
const rules = ast?.stylesheet?.rules;
|
||||||
if (rules) {
|
if (rules) {
|
||||||
for (const rule of rules) {
|
for (const rule of rules) {
|
||||||
|
if (rule.type === 'import') {
|
||||||
|
rules.splice(rules.indexOf(rule), 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (rule.type === 'rule') {
|
if (rule.type === 'rule') {
|
||||||
if (rule.selectors) {
|
if (rule.selectors) {
|
||||||
|
Loading…
Reference in New Issue
Block a user