We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61eb97d commit 0f26cc1Copy full SHA for 0f26cc1
README.md
@@ -41,13 +41,17 @@ php bin/magento setup:static-content:deploy
41
## Get List Of Used JS
42
```
43
/* Use in browser console */
44
-globalSrc = [];
+globalSrc = '';
45
jQuery('script').each(function(){
46
if (!jQuery(this).attr('src')) return;
47
-var src = (jQuery(this).attr('src').replace('PATH_TO_JS', ''));
48
-globalSrc.push(src)
+var src = jQuery(this).attr('src');
+if (src.indexOf('https://' + window.location.hostname) != -1 || src.indexOf('http://' + window.location.hostname) != -1) {
49
+var src = (src.replace(PATH_TO_JS, ''));
50
+globalSrc += "\n" + src;
51
+}
52
})
-console.log(JSON.stringify(globalSrc));
53
+console.log(globalSrc);
54
+
55
56
57
## Support
0 commit comments