extension-develop 3.11.1 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{677.cjs → 890.cjs} +111 -59
- package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
- package/dist/feature-scripts-content-script-wrapper.cjs +14 -2
- package/dist/feature-scripts-content-script-wrapper.js +14 -2
- package/dist/module.cjs +128 -331
- package/package.json +21 -19
- package/webpack/webpack-lib/build-dependencies.json +1 -1
package/dist/{677.cjs → 890.cjs}
RENAMED
|
@@ -3,7 +3,7 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ function() {
|
|
|
3
3
|
return "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
4
4
|
}();
|
|
5
5
|
exports.ids = [
|
|
6
|
-
"
|
|
6
|
+
"890"
|
|
7
7
|
];
|
|
8
8
|
exports.modules = {
|
|
9
9
|
"./webpack/dev-server/compiler-hooks.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -442,14 +442,14 @@ exports.modules = {
|
|
|
442
442
|
const timestamp = external_pintor_default().gray(`[${hh}:${mm}:${ss}]`);
|
|
443
443
|
const hasErrors = stats.hasErrors();
|
|
444
444
|
const hasWarnings = stats.hasWarnings();
|
|
445
|
-
const arrow = hasErrors ? external_pintor_default().red('✖✖✖') : hasWarnings ? external_pintor_default().brightYellow('
|
|
445
|
+
const arrow = hasErrors ? external_pintor_default().red('✖✖✖') : hasWarnings ? external_pintor_default().brightYellow('⏵⏵⏵') : external_pintor_default().gray('⏵⏵⏵');
|
|
446
446
|
const label = hasErrors ? external_pintor_default().red('with errors') : hasWarnings ? external_pintor_default().yellow('with warnings') : external_pintor_default().green('successfully');
|
|
447
447
|
const app = manifestName;
|
|
448
448
|
const time = `${durationMs} ms`;
|
|
449
449
|
return `${arrow} ${timestamp} ${app} compiled ${label} in ${time}.`;
|
|
450
450
|
}
|
|
451
451
|
function cleanDistStarting(distPath) {
|
|
452
|
-
return `${external_pintor_default().gray('
|
|
452
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Clean dist: ${external_pintor_default().gray('starting')}\n${external_pintor_default().gray('PATH')} ${external_pintor_default().underline(distPath)}`;
|
|
453
453
|
}
|
|
454
454
|
function cleanDistRemovedSummary(removedCount, distPath) {
|
|
455
455
|
return [
|
|
@@ -459,10 +459,10 @@ exports.modules = {
|
|
|
459
459
|
].join('\n');
|
|
460
460
|
}
|
|
461
461
|
function cleanDistSkippedNotFound(distPath) {
|
|
462
|
-
return `${external_pintor_default().gray('
|
|
462
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Clean dist: ${external_pintor_default().gray('skipped')} (path not found)\n${external_pintor_default().gray('PATH')} ${external_pintor_default().underline(distPath)}`;
|
|
463
463
|
}
|
|
464
464
|
function zipPackagingSkipped(reason) {
|
|
465
|
-
return `${external_pintor_default().gray('
|
|
465
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Packaging: ${external_pintor_default().gray('skipped')} (${external_pintor_default().gray(reason)})`;
|
|
466
466
|
}
|
|
467
467
|
function envSelectedFile(envPath) {
|
|
468
468
|
const label = envPath ? external_pintor_default().underline(envPath) : external_pintor_default().gray('none');
|
|
@@ -1585,7 +1585,7 @@ exports.modules = {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
plugin_compilation_define_property(CompilationPlugin, "name", 'plugin-compilation');
|
|
1587
1587
|
var css_lib_messages = __webpack_require__("./webpack/plugin-css/css-lib/messages.ts");
|
|
1588
|
-
var
|
|
1588
|
+
var has_dependency = __webpack_require__("./webpack/webpack-lib/has-dependency.ts");
|
|
1589
1589
|
var sass = __webpack_require__("./webpack/plugin-css/css-tools/sass.ts");
|
|
1590
1590
|
var less = __webpack_require__("./webpack/plugin-css/css-tools/less.ts");
|
|
1591
1591
|
function getStylelintConfigFile(projectPath) {
|
|
@@ -1618,7 +1618,7 @@ exports.modules = {
|
|
|
1618
1618
|
const isUsingStylelint = !!configFile;
|
|
1619
1619
|
if (isUsingStylelint) {
|
|
1620
1620
|
if (!userMessageDelivered) {
|
|
1621
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${external_pintor_default().brightMagenta('
|
|
1621
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${external_pintor_default().brightMagenta('⏵⏵⏵ Author says')} ${css_lib_messages.zA('Stylelint')}`);
|
|
1622
1622
|
userMessageDelivered = true;
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
@@ -1804,6 +1804,35 @@ exports.modules = {
|
|
|
1804
1804
|
}));
|
|
1805
1805
|
return rules;
|
|
1806
1806
|
}
|
|
1807
|
+
var external_parse5_utilities_ = __webpack_require__("parse5-utilities");
|
|
1808
|
+
function injectCssLink(headNode, feature, firstLinkAttrs, hrefOverride) {
|
|
1809
|
+
const linkTag = external_parse5_utilities_.createNode('link');
|
|
1810
|
+
linkTag.attrs = [
|
|
1811
|
+
{
|
|
1812
|
+
name: 'rel',
|
|
1813
|
+
value: 'stylesheet'
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
name: 'href',
|
|
1817
|
+
value: hrefOverride || `/${feature}.css`
|
|
1818
|
+
}
|
|
1819
|
+
];
|
|
1820
|
+
const propagateLinkAttrs = new Set([
|
|
1821
|
+
'media',
|
|
1822
|
+
'crossorigin',
|
|
1823
|
+
'integrity',
|
|
1824
|
+
'referrerpolicy',
|
|
1825
|
+
'type',
|
|
1826
|
+
'disabled'
|
|
1827
|
+
]);
|
|
1828
|
+
if (firstLinkAttrs) {
|
|
1829
|
+
for (const attr of firstLinkAttrs)if (propagateLinkAttrs.has(attr.name) && !linkTag.attrs.find((a)=>a.name === attr.name)) linkTag.attrs.push({
|
|
1830
|
+
name: attr.name,
|
|
1831
|
+
value: attr.value
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
external_parse5_utilities_.append(headNode, linkTag);
|
|
1835
|
+
}
|
|
1807
1836
|
function plugin_css_define_property(obj, key, value) {
|
|
1808
1837
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
1809
1838
|
value: value,
|
|
@@ -1820,8 +1849,8 @@ exports.modules = {
|
|
|
1820
1849
|
const projectPath = compiler.options.context || process.cwd();
|
|
1821
1850
|
const plugins = [];
|
|
1822
1851
|
const manifestPath = this.manifestPath;
|
|
1823
|
-
const usingSass = (0,
|
|
1824
|
-
const usingLess = (0,
|
|
1852
|
+
const usingSass = (0, has_dependency.w)(projectPath, 'sass');
|
|
1853
|
+
const usingLess = (0, has_dependency.w)(projectPath, 'less');
|
|
1825
1854
|
const maybeInstallStylelint = await maybeUseStylelint(projectPath);
|
|
1826
1855
|
plugins.push(...maybeInstallStylelint);
|
|
1827
1856
|
const maybeInstallSass = await (0, sass.IZ)(projectPath);
|
|
@@ -1854,6 +1883,8 @@ exports.modules = {
|
|
|
1854
1883
|
},
|
|
1855
1884
|
issuer: (issuer)=>(0, is_content_script.z)(issuer, manifestPath, projectPath)
|
|
1856
1885
|
});
|
|
1886
|
+
compiler.options.output.cssFilename = '[name].css';
|
|
1887
|
+
compiler.options.output.cssChunkFilename = '[name].css';
|
|
1857
1888
|
compiler.options.plugins = [
|
|
1858
1889
|
...compiler.options.plugins,
|
|
1859
1890
|
...plugins
|
|
@@ -1864,8 +1895,8 @@ exports.modules = {
|
|
|
1864
1895
|
].filter(Boolean);
|
|
1865
1896
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
|
|
1866
1897
|
const integrations = [];
|
|
1867
|
-
const usingTailwind = (0,
|
|
1868
|
-
const usingPostcss = (0,
|
|
1898
|
+
const usingTailwind = (0, has_dependency.w)(projectPath, 'tailwindcss');
|
|
1899
|
+
const usingPostcss = (0, has_dependency.w)(projectPath, 'postcss') || void 0 !== findPostCssConfig(projectPath) || usingSass || usingLess || usingTailwind;
|
|
1869
1900
|
if (usingPostcss) integrations.push('PostCSS');
|
|
1870
1901
|
if (usingSass) integrations.push('Sass');
|
|
1871
1902
|
if (usingLess) integrations.push('Less');
|
|
@@ -1928,14 +1959,14 @@ exports.modules = {
|
|
|
1928
1959
|
}
|
|
1929
1960
|
function assetsRulesEnabled(rules) {
|
|
1930
1961
|
const list = rules.length > 0 ? rules.map((n)=>external_pintor_default().yellow(n)).join(', ') : external_pintor_default().gray('none');
|
|
1931
|
-
return `${external_pintor_default().gray('
|
|
1962
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Assets: Rules enabled (${external_pintor_default().gray(String(rules.length))}) ${list}`;
|
|
1932
1963
|
}
|
|
1933
1964
|
function assetsConfigsDetected(filenamePattern, svgRuleMode, svgInlineLimitKB, imageInlineLimitKB, fileInlineLimitKB) {
|
|
1934
1965
|
const fmt = (v)=>v || 0 === v ? external_pintor_default().underline(String(v)) : external_pintor_default().gray('n/a');
|
|
1935
|
-
return `${external_pintor_default().gray('
|
|
1966
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Assets: Configs\n${external_pintor_default().gray('FILENAME_PATTERN')} ${external_pintor_default().underline(filenamePattern)}\n${external_pintor_default().gray('SVG_RULE')} ${external_pintor_default().yellow(svgRuleMode)}\n${external_pintor_default().gray('SVG_INLINE_LIMIT')} ${fmt(svgInlineLimitKB)}${svgInlineLimitKB ? external_pintor_default().gray('KB') : ''}\n${external_pintor_default().gray('IMAGE_INLINE_LIMIT')} ${fmt(imageInlineLimitKB)}${imageInlineLimitKB ? external_pintor_default().gray('KB') : ''}\n${external_pintor_default().gray('FILE_INLINE_LIMIT')} ${fmt(fileInlineLimitKB)}${fileInlineLimitKB ? external_pintor_default().gray('KB') : ''}`;
|
|
1936
1967
|
}
|
|
1937
1968
|
function assetsEmittedSummary(total, byCategory) {
|
|
1938
|
-
return `${external_pintor_default().gray('
|
|
1969
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Assets: Emitted ${external_pintor_default().gray(String(total))} file(s)\n${external_pintor_default().gray('SVG')} ${external_pintor_default().underline(String(byCategory.svg))}\n${external_pintor_default().gray('IMAGES')} ${external_pintor_default().underline(String(byCategory.images))}\n${external_pintor_default().gray('FONTS')} ${external_pintor_default().underline(String(byCategory.fonts))}\n${external_pintor_default().gray('FILES')} ${external_pintor_default().underline(String(byCategory.files))}`;
|
|
1939
1970
|
}
|
|
1940
1971
|
function plugin_static_assets_define_property(obj, key, value) {
|
|
1941
1972
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
@@ -2176,7 +2207,7 @@ exports.modules = {
|
|
|
2176
2207
|
}
|
|
2177
2208
|
} catch {}
|
|
2178
2209
|
const maybeInstallReact = await (0, react.b)(projectPath, {
|
|
2179
|
-
disableRefresh:
|
|
2210
|
+
disableRefresh: 'development' !== mode,
|
|
2180
2211
|
refreshExclude: (resourcePath)=>isfeatureScriptsContentLike(resourcePath)
|
|
2181
2212
|
});
|
|
2182
2213
|
const maybeInstallPreact = await (0, preact.b)(projectPath);
|
|
@@ -3741,7 +3772,6 @@ exports.modules = {
|
|
|
3741
3772
|
const fieldLabel = isContentScripts ? `content_scripts (index ${contentIndex})` : manifestFieldName;
|
|
3742
3773
|
return `Check the ${external_pintor_default().yellow(fieldLabel)} field in your ${external_pintor_default().yellow('manifest.json')} file.`;
|
|
3743
3774
|
}
|
|
3744
|
-
var external_parse5_utilities_ = __webpack_require__("parse5-utilities");
|
|
3745
3775
|
function parse_html_isUrl(src) {
|
|
3746
3776
|
try {
|
|
3747
3777
|
new URL(src);
|
|
@@ -4057,34 +4087,6 @@ exports.modules = {
|
|
|
4057
4087
|
if (external_fs_.existsSync(absolutePath)) node = external_parse5_utilities_.setAttribute(node, 'staticSrc' === assetType ? 'src' : 'href', getFilePath(filepath, '', true) + (search || '') + (hash || ''));
|
|
4058
4088
|
return node;
|
|
4059
4089
|
}
|
|
4060
|
-
function injectCssLink(headNode, feature, firstLinkAttrs) {
|
|
4061
|
-
const linkTag = external_parse5_utilities_.createNode('link');
|
|
4062
|
-
linkTag.attrs = [
|
|
4063
|
-
{
|
|
4064
|
-
name: 'rel',
|
|
4065
|
-
value: 'stylesheet'
|
|
4066
|
-
},
|
|
4067
|
-
{
|
|
4068
|
-
name: 'href',
|
|
4069
|
-
value: getFilePath(feature, '.css', true)
|
|
4070
|
-
}
|
|
4071
|
-
];
|
|
4072
|
-
const propagateLinkAttrs = new Set([
|
|
4073
|
-
'media',
|
|
4074
|
-
'crossorigin',
|
|
4075
|
-
'integrity',
|
|
4076
|
-
'referrerpolicy',
|
|
4077
|
-
'type',
|
|
4078
|
-
'disabled'
|
|
4079
|
-
]);
|
|
4080
|
-
if (firstLinkAttrs) {
|
|
4081
|
-
for (const attr of firstLinkAttrs)if (propagateLinkAttrs.has(attr.name) && !linkTag.attrs.find((a)=>a.name === attr.name)) linkTag.attrs.push({
|
|
4082
|
-
name: attr.name,
|
|
4083
|
-
value: attr.value
|
|
4084
|
-
});
|
|
4085
|
-
}
|
|
4086
|
-
external_parse5_utilities_.append(headNode, linkTag);
|
|
4087
|
-
}
|
|
4088
4090
|
function injectJsScript(bodyNode, feature, firstScriptAttrs) {
|
|
4089
4091
|
const scriptTag = external_parse5_utilities_.createNode("script");
|
|
4090
4092
|
scriptTag.attrs = [
|
|
@@ -4106,13 +4108,32 @@ exports.modules = {
|
|
|
4106
4108
|
}
|
|
4107
4109
|
external_parse5_utilities_.append(bodyNode, scriptTag);
|
|
4108
4110
|
}
|
|
4111
|
+
function resolveCssAsset(compilation, feature) {
|
|
4112
|
+
if (compilation.getAsset(feature + '.css')) return {
|
|
4113
|
+
found: true,
|
|
4114
|
+
href: void 0
|
|
4115
|
+
};
|
|
4116
|
+
const entrypoint = compilation.entrypoints?.get(feature);
|
|
4117
|
+
if (entrypoint) {
|
|
4118
|
+
for (const chunk of entrypoint.chunks)for (const file of chunk.files)if (file.endsWith('.css')) return {
|
|
4119
|
+
found: true,
|
|
4120
|
+
href: '/' + file
|
|
4121
|
+
};
|
|
4122
|
+
}
|
|
4123
|
+
return {
|
|
4124
|
+
found: false,
|
|
4125
|
+
href: void 0
|
|
4126
|
+
};
|
|
4127
|
+
}
|
|
4109
4128
|
function patchHtml(compilation, feature, htmlEntry, includeList) {
|
|
4110
4129
|
const htmlFile = external_fs_.readFileSync(htmlEntry, {
|
|
4111
4130
|
encoding: 'utf8'
|
|
4112
4131
|
});
|
|
4113
4132
|
const htmlDocument = external_parse5_utilities_.parse(htmlFile);
|
|
4114
4133
|
const baseHref = getBaseHref(htmlDocument);
|
|
4115
|
-
|
|
4134
|
+
const cssAsset = resolveCssAsset(compilation, feature);
|
|
4135
|
+
let hasCssEntry = cssAsset.found;
|
|
4136
|
+
let cssHrefOverride = cssAsset.href;
|
|
4116
4137
|
let hasJsEntry = false;
|
|
4117
4138
|
let firstScriptAttrs;
|
|
4118
4139
|
let firstLinkAttrs;
|
|
@@ -4155,7 +4176,7 @@ exports.modules = {
|
|
|
4155
4176
|
}
|
|
4156
4177
|
});
|
|
4157
4178
|
if ('head' === htmlChildNode.nodeName) {
|
|
4158
|
-
if (hasCssEntry) injectCssLink(htmlChildNode, feature, firstLinkAttrs);
|
|
4179
|
+
if (hasCssEntry) injectCssLink(htmlChildNode, feature, firstLinkAttrs, cssHrefOverride);
|
|
4159
4180
|
}
|
|
4160
4181
|
if ('body' === htmlChildNode.nodeName) {
|
|
4161
4182
|
if (hasJsEntry || 'production' !== compilation.options.mode) injectJsScript(htmlChildNode, feature, firstScriptAttrs);
|
|
@@ -4448,6 +4469,32 @@ exports.modules = {
|
|
|
4448
4469
|
if ('boolean' == typeof value) return String(value);
|
|
4449
4470
|
return 'true';
|
|
4450
4471
|
}
|
|
4472
|
+
let _resolvedClientPath;
|
|
4473
|
+
let _resolvedHotPath;
|
|
4474
|
+
function resolveHmrClientPath() {
|
|
4475
|
+
if (!_resolvedClientPath) try {
|
|
4476
|
+
_resolvedClientPath = require.resolve('@rspack/dev-server/client/index.js', {
|
|
4477
|
+
paths: [
|
|
4478
|
+
__dirname
|
|
4479
|
+
]
|
|
4480
|
+
});
|
|
4481
|
+
} catch {
|
|
4482
|
+
_resolvedClientPath = '@rspack/dev-server/client/index.js';
|
|
4483
|
+
}
|
|
4484
|
+
return _resolvedClientPath;
|
|
4485
|
+
}
|
|
4486
|
+
function resolveHmrHotPath() {
|
|
4487
|
+
if (!_resolvedHotPath) try {
|
|
4488
|
+
_resolvedHotPath = require.resolve('webpack/hot/dev-server', {
|
|
4489
|
+
paths: [
|
|
4490
|
+
__dirname
|
|
4491
|
+
]
|
|
4492
|
+
});
|
|
4493
|
+
} catch {
|
|
4494
|
+
_resolvedHotPath = 'webpack/hot/dev-server';
|
|
4495
|
+
}
|
|
4496
|
+
return _resolvedHotPath;
|
|
4497
|
+
}
|
|
4451
4498
|
function getDevServerHmrImports(compiler) {
|
|
4452
4499
|
const devServer = compiler.options?.devServer;
|
|
4453
4500
|
const envHost = process.env.EXTENSION_DEV_SERVER_HOST;
|
|
@@ -4480,8 +4527,8 @@ exports.modules = {
|
|
|
4480
4527
|
'live-reload': liveReload
|
|
4481
4528
|
});
|
|
4482
4529
|
return [
|
|
4483
|
-
|
|
4484
|
-
|
|
4530
|
+
`${resolveHmrClientPath()}?${query.toString()}`,
|
|
4531
|
+
resolveHmrHotPath()
|
|
4485
4532
|
];
|
|
4486
4533
|
}
|
|
4487
4534
|
var develop_context = __webpack_require__("./webpack/webpack-lib/develop-context.ts");
|
|
@@ -8190,13 +8237,13 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
8190
8237
|
function messages_getLoggingPrefix(type) {
|
|
8191
8238
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
8192
8239
|
if (isAuthor) {
|
|
8193
|
-
const base = 'error' === type ? 'ERROR Author says' : '
|
|
8240
|
+
const base = 'error' === type ? 'ERROR Author says' : '⏵⏵⏵ Author says';
|
|
8194
8241
|
return external_pintor_default().brightMagenta(base);
|
|
8195
8242
|
}
|
|
8196
8243
|
if ('error' === type) return external_pintor_default().red('ERROR');
|
|
8197
|
-
if ('warn' === type) return external_pintor_default().brightYellow('
|
|
8198
|
-
if ('info' === type) return external_pintor_default().gray('
|
|
8199
|
-
return external_pintor_default().green('
|
|
8244
|
+
if ('warn' === type) return external_pintor_default().brightYellow('⏵⏵⏵');
|
|
8245
|
+
if ('info' === type) return external_pintor_default().gray('⏵⏵⏵');
|
|
8246
|
+
return external_pintor_default().green('⏵⏵⏵');
|
|
8200
8247
|
}
|
|
8201
8248
|
const messages_code = (text)=>external_pintor_default().blue(text);
|
|
8202
8249
|
function webextensionPolyfillNotFound() {
|
|
@@ -8208,13 +8255,13 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
8208
8255
|
return external_pintor_default().yellow(`${cap}`);
|
|
8209
8256
|
}
|
|
8210
8257
|
function compatibilityPolyfillEnabled(browser, polyfillPath) {
|
|
8211
|
-
return `${external_pintor_default().gray('
|
|
8258
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Compatibility: Polyfill enabled for ${capitalizedBrowserName(browser)}\n${external_pintor_default().gray('ALIAS')} ${external_pintor_default().underline(polyfillPath)}`;
|
|
8212
8259
|
}
|
|
8213
8260
|
function compatibilityPolyfillSkipped(reason, browser) {
|
|
8214
|
-
return `${external_pintor_default().gray('
|
|
8261
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Compatibility: Polyfill ${external_pintor_default().gray('skipped')} for ${capitalizedBrowserName(browser)} (${external_pintor_default().gray(reason)})`;
|
|
8215
8262
|
}
|
|
8216
8263
|
function compatibilityPolyfillDisabled(browser) {
|
|
8217
|
-
return `${external_pintor_default().gray('
|
|
8264
|
+
return `${external_pintor_default().gray('⏵⏵⏵')} Compatibility: Polyfill ${external_pintor_default().gray('disabled')} for ${capitalizedBrowserName(browser)}`;
|
|
8218
8265
|
}
|
|
8219
8266
|
function feature_polyfill_define_property(obj, key, value) {
|
|
8220
8267
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
@@ -8399,7 +8446,7 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
8399
8446
|
if (/\bcontent(_scripts)?\b/i.test(u) || /\bcontent[-_/]/i.test(text)) return 'content';
|
|
8400
8447
|
return 'page';
|
|
8401
8448
|
})();
|
|
8402
|
-
const prefix = '
|
|
8449
|
+
const prefix = '⏵⏵⏵';
|
|
8403
8450
|
function fmtLevel(lvl) {
|
|
8404
8451
|
const up = String(lvl || 'log').toUpperCase();
|
|
8405
8452
|
switch(String(lvl || '').toLowerCase()){
|
|
@@ -12036,14 +12083,19 @@ Set background.noDynamicEntryWarning to true to disable this warning.
|
|
|
12036
12083
|
return '';
|
|
12037
12084
|
}
|
|
12038
12085
|
})()`);
|
|
12039
|
-
if ('string' == typeof shadowHtml &&
|
|
12040
|
-
const matches = Array.from(shadowHtml.matchAll(/<style[\s\S]*?<\/style>/
|
|
12086
|
+
if ('string' == typeof shadowHtml && /<style/i.test(shadowHtml)) {
|
|
12087
|
+
const matches = Array.from(shadowHtml.matchAll(/<style[\s\S]*?<\/style>/gi)).slice(0, 3);
|
|
12041
12088
|
if (matches.length > 0) return {
|
|
12042
12089
|
rootMode: 'shadow',
|
|
12043
12090
|
count: totalCount,
|
|
12044
12091
|
styles: matches.map((match)=>{
|
|
12045
12092
|
const html = String(match[0] || '');
|
|
12046
|
-
|
|
12093
|
+
let text = html;
|
|
12094
|
+
let prev;
|
|
12095
|
+
do {
|
|
12096
|
+
prev = text;
|
|
12097
|
+
text = text.replace(/<style[^>]*>|<\/style>/gi, '');
|
|
12098
|
+
}while (text !== prev);
|
|
12047
12099
|
return {
|
|
12048
12100
|
html,
|
|
12049
12101
|
textLength: text.length,
|