Created
August 1, 2023 22:14
-
-
Save brol1dev/3ecdbdb9e2865e043929dff8ff5c1a77 to your computer and use it in GitHub Desktop.
Ramp url flag decode script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getValue(ul) { | |
const li = ul.querySelector('li'); | |
if (!li) { | |
return null; | |
} | |
const div = li.querySelector('div'); | |
if (!div) { | |
return null; | |
} | |
const span = div.querySelector('span'); | |
if (!span) { | |
return null; | |
} | |
const value = span.getAttribute('value'); | |
return value; | |
} | |
const uls = document.querySelectorAll('ul'); | |
const valueArr = [] | |
for (const ul of uls) { | |
const value = getValue(ul); | |
if (value) { | |
valueArr.push(value); | |
} | |
} | |
console.log(valueArr.join('')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment