index changes
This commit is contained in:
19
find_urls.js
Normal file
19
find_urls.js
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const cssDir = 'c:/xampp/htdocs/doormileweb/assets/css';
|
||||
const files = fs.readdirSync(cssDir).filter(f => f.endsWith('.css'));
|
||||
|
||||
files.forEach(file => {
|
||||
const filePath = path.join(cssDir, file);
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
const urlRegex = /url\(['"]?([^'")]+)['"]?\)/g;
|
||||
let match;
|
||||
while ((match = urlRegex.exec(content)) !== null) {
|
||||
const url = match[1];
|
||||
if (!url.startsWith('data:') && !url.startsWith('/doormileweb/assets/')) {
|
||||
console.log(`${file}: ${match[0]}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user