Just a bunch of bookmarklets I am making to learn more.
The idea of this bookmarklet is to:
- Disply a prompt requesting a text string from the user.
- Set that string to a variable.
- Search for an element with an ID attribute that matches the string.
- Identify whether the identified element has any child elements that either have a role attribute set to "option" or "listitem", OR that are Option (
<option>
) or List Item (<li>
) elements - If any such child elements exist, iterate through them & add their inner text s items in an array.
- Once complete, display the array as a list in a prompt that the user can copy from or close.