What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

I'm writing a GreaseMonkey script to help me with retagging, and I need the post ID for the script. The problem is that on the search results page, there is no output of the question ID in the DOM to be found.

On the other pages, we get <div id="question-summary-12345678" ...> but in the search results, all of them are <div id="question-summary" ...> and that's it.

My request is to please output the post ID on the search results page to match the other pages.

Edit: I realized this DOM is also on the user profile page, and the ID is included in there as well.

share|improve this question
So you want to retag based on snippets? – random Mar 8 '10 at 1:49
@random: Most of the retagging I've done has been for things like [versioncontrol] --> [version-control], where I don't even need to read the post body. Regardless, what I'm doing with the question ID isn't really the point. I think that it should be available in the DOM just like on the other pages. – Jon Seigel Mar 8 '10 at 2:25
...also, the post body is visible on the edit page if I feel like it needs to be read (usually a weird combination of tags will make me read it). – Jon Seigel Mar 8 '10 at 2:36

1 Answer 1

up vote 3 down vote accepted

You can always scrape the question number from the hyperlink, so there is a way to accomplish this. And since the API is right around the corner (it is, right?), I don't think it's that big of a neccessity.

share|improve this answer
@balpha: Very good point. All the question links are class'd properly, so I could scrape the ID from the href. I will do that in the meantime. However, for completeness' sake, I still think my request should be taken care of, since someone else may want to do other things with that part of the DOM. – Jon Seigel Mar 9 '10 at 18:41
I somehow feel scraping from the URL is even better than scraping from <div id=..> – Arjan Mar 13 '10 at 7:21
@Arjan: Yes, I agree with that 100% now. But I'd still like the DOM to be consistent throughout the site for other users writing scripts down the line. – Jon Seigel Mar 13 '10 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .