Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function returnRefinedURL(url) {
- return url.replace(new RegExp("=\\w+"),"").replace("?&","?")
- .replace("&&","&")
- }
- testsAndRequests = []
- document.querySelector('.report-waterfall').contentWindow.document.querySelectorAll('.vsc-initialized table .netTable').forEach((table, index) => {
- table.querySelectorAll('.netFullHrefLabel.netHrefLabel.netLabel ').forEach((row, rowIndex) => {
- if (rowIndex === 0) { testsAndRequests.push([]) }
- testsAndRequests[index].push(row.textContent);
- })
- })
- firstTestRequests = testsAndRequests[0].map(returnRefinedURL);
- secondTestRequests = testsAndRequests[1].map(returnRefinedURL);
- console.log('In A not in B: ', firstTestRequests.filter(x => !secondTestRequests.includes(x)));
- console.log('In B not in A: ', secondTestRequests.filter(x => !firstTestRequests.includes(x)))
Add Comment
Please, Sign In to add comment