News for hackers. Stuff that matters.
Re:Show HN: Extract a unique CSS selector for any element on... by malditojavi on Wednesday October 07, 2015 @07:12AM (#10345301)
I don't get it - I do this in Chrome tools > magnifying glass > right click > Copy CSS path. What does it solve this ?
Re:Show HN: Extract a unique CSS selector for any element on... by GFuller on Wednesday October 07, 2015 @07:18AM (#10345323)
The purpose of this bookmarklet is to provide a streamlined method of getting the selector without having to go into the source or use chrome tools.

There is also the problem of using ids. For example in Flutter I may want to auto tweet out the top post in a list of posts on a blog. If the posts have individual ids, and the CSS selector includes them, every time Flutter tries to scrape new content it will get the same post. I want the unique selector for the page element. i.e. the first post in the list.

Re:Show HN: Extract a unique CSS selector for any element on... by eterm on Wednesday October 07, 2015 @08:39AM (#10345596)
This is built in to FireFox too. Right click element, "Inspect Element", Right click element which is now scrolled in view and highlighted in the tools, "Copy Unique Selector".

I guess having it directly on right click or in view would be useful sometimes.