@@ -22,7 +22,7 @@ export class HarAnalyzer {
2222 const libFolder = fileURLToPath ( new URL ( '..' , import . meta. url ) ) ;
2323 this . pluginFolder = path . resolve ( libFolder , '..' ) ;
2424 }
25- transform2SimplifiedData ( harData , url , group ) {
25+ transform2SimplifiedData ( harData , url ) {
2626 const data = {
2727 'url' : url ,
2828 'security-rules' : this . configSecurity ,
@@ -82,20 +82,6 @@ export class HarAnalyzer {
8282 data [ 'script-elements' ] . push ( styleElementObj ) ;
8383 }
8484 } ) ;
85-
86- // Extract style="" attributes from HTML content
87- // const elementsWithStyleAttr = dom.window.document.querySelectorAll('[style]');
88- // elementsWithStyleAttr.forEach((element, index) => {
89- // const styleAttrContent = element.getAttribute('style');
90- // const styleAttrObj = {
91- // 'url': htmlObj.url,
92- // // Wrap the style attribute content in a dummy #id rule
93- // 'content': `#dummy-style-attribute-id { ${styleAttrContent} }`,
94- // 'index': htmlObj.index
95- // };
96- // data['all-styles'].push(styleAttrObj);
97- // data['style-attributes'].push(styleAttrObj);
98- // });
9985 }
10086
10187 return data ;
@@ -175,7 +161,7 @@ export class HarAnalyzer {
175161 this . groups [ group ] = { } ;
176162 }
177163
178- const analyzedData = this . transform2SimplifiedData ( harData , url , group ) ;
164+ const analyzedData = this . transform2SimplifiedData ( harData , url ) ;
179165 if ( ! ( 'analyzedData' in this . groups [ group ] ) ) {
180166 this . groups [ group ] [ 'analyzedData' ] = [ ]
181167 }
0 commit comments