Ask HN: How would you link to specific parts of a page?
10 comments
You could proxy the page, and rewrite bits of it on the fly (adding a class and/or anchors around the bit you wanted to highlight).
If I wanted to do this, I'd start by hacking for a few hours on http://www.jmarshall.com/tools/cgiproxy/ I'm pretty sure I could get a (non-scalable, resource hungry) proof of concept running in a evening starting from there - that'd be enough to start showing people and seeing if they even understand why you might want to use something like this...
If I wanted to do this, I'd start by hacking for a few hours on http://www.jmarshall.com/tools/cgiproxy/ I'm pretty sure I could get a (non-scalable, resource hungry) proof of concept running in a evening starting from there - that'd be enough to start showing people and seeing if they even understand why you might want to use something like this...
I worked on just this for last year's Rails Rumble:
http://morsurl.com/
The site acts as a proxy, injecting some Javascript based on SelectorGadget to allow the user to select parts of the page, and injecting inline styles to display the highlighted parts of the page.
http://morsurl.com/
The site acts as a proxy, injecting some Javascript based on SelectorGadget to allow the user to select parts of the page, and injecting inline styles to display the highlighted parts of the page.
Nice, man. Cool name for it, too.
Done. No extension necessary.
http://awurl.com/wcD8whqQG
http://awurl.com/wcD8whqQG
Clickable link to the actual service: http://www.awesomehighlighter.com/
Ah, nice. Looks like they proxy it.
also look at www.snip.ly -- it doesn't highlight per-se, but it brings the text you've selected in a lightbox over the original article. Like awesomehighlighter (which someone else mentioned, it won't work on NYTimes pages.
also, check out Diigo. It's the bookmarking service i use. They let you highlight text, add post-its, etc. as part of the bookmarking process.
also, check out Diigo. It's the bookmarking service i use. They let you highlight text, add post-its, etc. as part of the bookmarking process.
The other day, a friend and I were eating lunch and I was dropping my usual, subliminal "so, any cool neat ideas for websites?" type questions. He always seems to have complaints about the web, which are good for somebody like me (always looking for fun projects). After some discussion we started coming up with a pretty neat sounding idea.
The idea is to be able to highlight some text on a page, and create a permalink to the page that shows those highlights. For example, you're on Wikipedia and see a sweet quote, or really important word, and you want your buddy to read it. You could copy and paste it to him, over AIM or something, and then send him the URL, too. Or you could just send him the URL and say "scroll down to the third paragraph." Or, you could use this idea and highlight that quote or word somehow and create a permalink to that exact word. It would function exactly like HTML anchors do, but without requiring that page to have an anchor where you want to link to.
I don't know if anything likes this exists in a pure Javascript form or not. I know there are browser plugins that can kind of do this. I know some blogs append anchors to every paragraph for this. But, that doesn't really matter, I'm just trying to figure out how this would be possible without using those methods.
I was thinking in terms of Javascript, but I'm not sure if it's quite possible. I'm pretty sure you can't load up the page being linked to in an iframe and run javascript on it. I know you can't ask that page to load your JS.
Does anyone have any ideas on how this could be possible without a browser plugin?
Edit: I have also thought about a bookmarklet. This would allow you to generate a link to a certain area of a page, using whatever algorithms you had to find that area and create a link. But, I don't know how it would work in the opposite direction: going from link -> area of page.