MCPcopy
hub / github.com/QasimWani/LeetHub / parseStats

Function parseStats

scripts/leetcode.js:500–512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

498
499/* Parser function for time/space stats */
500function parseStats() {
501 const probStats = document.getElementsByClassName('data__HC-i');
502 if (!checkElem(probStats)) {
503 return null;
504 }
505 const time = probStats[0].textContent;
506 const timePercentile = probStats[1].textContent;
507 const space = probStats[2].textContent;
508 const spacePercentile = probStats[3].textContent;
509
510 // Format commit message
511 return `Time: ${time} (${timePercentile}), Space: ${space} (${spacePercentile}) - LeetHub`;
512}
513
514document.addEventListener('click', (event) => {
515 const element = event.target;

Callers 1

leetcode.jsFile · 0.85

Calls 1

checkElemFunction · 0.85

Tested by

no test coverage detected