But consider the following problem: Find and display all comments by me that are children of this post, and only those comments, using only browser UI elements, i.e. not the LW-specific page widgets. You cannot—and I’d be pretty surprised if you could make a browser extension that could do it without resorting to the API, skipping the previous elements in the chain above. For that matter, if you can do it with the existing page widgets, I’d love to know how.
It would require a relatively simple XPath/XSLT-based browser extension. I had the XPath expression written, but removed it because it could be used for evil. (I feel mentioning the possibility is safe because the expression is sufficiently ugly that only those who would already think of it, or those who are sufficiently devoted that they will solve the problem anyways regardless of the solution they take, are going to be able to write it.)
I’m having trouble parsing your purpose. What’s the objective here? Are we looking at ways to include non-LW content in LW?
Do an HTTP Get, run some simple XSLT on the response. For Slate Star Codex, <xsl:variable name=”body” select=”div[@class=‘pjgm-postcontent’] />, then do whatever it is you want to do in the for-each.
(I expect my XSLT will get mauled, so edits may be required.)
In addition to Brotherzed’s solution to this:
It would require a relatively simple XPath/XSLT-based browser extension. I had the XPath expression written, but removed it because it could be used for evil. (I feel mentioning the possibility is safe because the expression is sufficiently ugly that only those who would already think of it, or those who are sufficiently devoted that they will solve the problem anyways regardless of the solution they take, are going to be able to write it.)
I’m having trouble parsing your purpose. What’s the objective here? Are we looking at ways to include non-LW content in LW?
Do an HTTP Get, run some simple XSLT on the response. For Slate Star Codex, <xsl:variable name=”body” select=”div[@class=‘pjgm-postcontent’] />, then do whatever it is you want to do in the for-each.
(I expect my XSLT will get mauled, so edits may be required.)