Generate CSS selectors from sample elements.

Latest Version

Version
0.1.6
Update
October 17, 2020
Size
57.16KiB
Developer
www.heliumscraper.com
Category
Users
34
Rating
0 ★
Manifest Version
2
Web Store Status
Languages Support
English
See more
Permissions
See more

Helium Selectors Extension

To use this extension, open up the developer tools and find the \"Selectors\" tab. Once opened, press \"Enable Selection Mode\", if not already enabled, and start selecting elements. The algorithm will attempt to find the most specific and shortest selector, so often you'll have to add many samples, or press \"Select Similar Elements\" until you get the selector you want. It also has a \"Select Inspected Element\" button that selects the currently inspected ($0) element so you can also add elements that are hidden or difficult to highlight with the mouse.

If you visit a page after creating a CSS selector and turn on selection mode, all matching elements will be highlighted and will be able to keep adding sample elements if needed. The extension will remember all the sample elements, so visiting new pages will often update the CSS selector to prevent selecting elements that haven't been used as samples, as the extension will always try to be as specific as possible. So for instance when creating a selector for a next button, it's usually a good idea to visit at least a couple of pages where the next button is (and add more samples if needed), and also the last page in case there is a disabled next button, so that the algorithm updates the selector to not select the disabled next button.
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx",\t"manifest_version": 2,\t"name": "Helium Selectors",\t"version": "0.1.6",\t"icons": {\t\t"16": "/media/icon/16.png",\t\t"24": "/media/icon/24.png",\t\t"32": "/media/icon/32.png",\t\t"48": "/media/icon/48.png",\t\t"64": "/media/icon/64.png",\t\t"128": "/media/icon/128.png"\t},\t"description": "Generate CSS selectors from sample elements.",\t"devtools_page": "html/devtools.html",\t"content_scripts": [{\t\t"matches": [\t\t\t"http://*/*",\t\t\t"https://*/*"\t\t],\t\t"js": ["/js/inject/sets.js", "/js/inject/combinator.js", "/js/inject/gathering.js", "/js/inject/overlay.js", "/js/inject/inject.js"]\t}],\t"browser_action": {\t\t"default_title": "Helium Selectors",\t\t"default_popup": "html/popup.html"\t}}
Read more