I'm testing for text input fields that have issues with various characters, and I have no idea where to start, but I want a bookmarklet that fills every form on the page with
¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿƒΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ•…′″‾⁄℘ℑℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋〈〉◊♠♣♥♦"&<>ŒœŠšŸˆ˜–—‘’‚“”„†‡‰‹›€
can anyone help?
Bookmarklet using
querySelectorAll
for modern browsers (replace 'my_test_string' with the (optionally escaped) teststring you require):Note that you can pass in multiple CSS selectors:
Alternative fallback for legacy browsers (using
getElementsByTagName
in conjunction with a short-circuit type test for 'text'):Pure javascript, no libraries required!
Hope this gets you started!
PS: Yes, it's 'golfed': it's a bookmarklet (and we need to leave as much room as possible for the (optionally escaped) test-string).. besides the routine is as basic as it can get.. note that the semicolon closing the packed for-loop is required!