NYTimes Opensources Their Deep Linking JS
open.blogs.nytimes.com
NYTimes Opensources Their Deep Linking JS
1–10 of 56 posts
Re: NYTimes Opensources Their Deep Linking JS
#2Re: NYTimes Opensources Their Deep Linking JS
#3.nytd_selection_button { display:none; }
Re: NYTimes Opensources Their Deep Linking JS
#4On Github, they say they'll eventually remove the dependency on PrototypeJS. The library is only ~10k now, hopefully that change won't increase the size too much.
Re: NYTimes Opensources Their Deep Linking JS
#5On Github, they say they'll eventually remove the dependency on PrototypeJS. The library is only ~10k now, hopefully that change won't increase the size too much.
Perhaps some kind of alternate src attribute on script tags, so you could list a local copy (for reliability) as well as Google and Microsoft CDN URLs, and the browser would go with the first one it had in its cache. And if individual browsers wanted to distribute jQuery (et al.) along with the browser itself, and define an URN for it, so much the better.
This is just something I thought up in the past few minutes, so take it with a grain of salt, but as a web developer, I would love this.
Re: NYTimes Opensources Their Deep Linking JS
#6For example, I could have every paragraph an id say id="p5" and then link ad example.com/story#p5 and voila, deep linking.
Hoorah for reinventing the wheel :)
Re: NYTimes Opensources Their Deep Linking JS
#7Re: NYTimes Opensources Their Deep Linking JS
#8I don't understand what's so awesome about this? Browsers have supported deep linking since forever. You can link to any specific id on a page and the browser will scroll to it when you open the page. For example, I could have every paragraph an id say id="p5" and then link ad example.com/story#p5 and voila, deep linking. Hoorah for reinventing the wheel :)
This addresses this (as stated in the article) without some elaborate server content management solution that tracks paragraphs and their html id links.
Re: NYTimes Opensources Their Deep Linking JS
#9Speaking of NYTimes, Safari user stylesheet has a line to disable the annoying word definition popup when selecting text. .nytd_selection_button { display:none; }
Re: NYTimes Opensources Their Deep Linking JS
#10I don't understand what's so awesome about this? Browsers have supported deep linking since forever. You can link to any specific id on a page and the browser will scroll to it when you open the page. For example, I could have every paragraph an id say id="p5" and then link ad example.com/story#p5 and voila, deep linking. Hoorah for reinventing the wheel :)
The difference is no 'href' tags. The 'tag' is automatically created based on the words in the paragraph, via Javascript, and decoded appropriately.
It is also slightly neat in that you can highlight a specific sentence (multiple sentences actually, see the little tutorial at the bottom).
I actually kind of like it, it would be a neat way to really highlight what you think is interesting in an article when sending someone a link. But doing it as a per site thing is crazy.. seems like it could be a good browser extension though. People who have it installed would instantly get a more functional linking experience. Imagine linking off to some documentation in a blog post for a coding problem, say to a Django documentation page, and when someone clicks the link they are not only taken to the specific part of the page that you are talking about, but the relevant stuff is actually highlighted. That'd be Neat (tm).