-
Contact
- Google Talk: bgolub@benjamingolub.com
- Phone: Send me an email and I'll gladly provide my phone number.
-
Pages
-
Blogroll
-
Elsewhere
-
FriendFeed
-
Comments
-
Twitter -
Flickr
-
Recent Posts
-
Most Shared Stories -
Tags
adsense amazon apache api apps beautifulsoup blog cache cooking dearlazyweb Django Dreamhost fftogo fish Flashcards Food friendfeed Google google app engine Internet language Last.fm Life Linux loki nikon notes pagerank Photography pop secrets Programming Python readburner recipe rss rssmeme School search slicehost statistics stats Stream twitter Vietnam wordpress -
Archives
- July 2008 (1)
- June 2008 (21)
- May 2008 (28)
- April 2008 (14)
- March 2008 (9)
- February 2008 (26)
- January 2008 (3)
- December 2007 (6)
- November 2007 (4)
- October 2007 (5)
- September 2007 (4)
- August 2007 (2)
- July 2007 (5)
- June 2007 (5)
- May 2007 (3)
- April 2007 (2)
- March 2007 (4)
- February 2007 (6)

How To: Dynamic Slide Down Disqus Comments
RSSmeme now has dynamically generated slide down Disqus comments for every story (see it in action by clicking the comment link next to “Contribute”). I had to hack around a bit with the Disqus provided embed.js to get it working, here’s how:
document.write()where the style information is written. Dynamically calling this script with the style writing will blank out your screen for some reason (I’m not a javascript expert so don’t ask me why).disqus_container_idbut alas it does not. I thought about copying thread.js locally and making this enhancement but decided against it.So here is how my code looks (the
hack()function is where I locally copied embed.js):There are some side effects that need to be fixed too:
disqus_urlanddisqus_container_idare global variables. Yuck, I know, but I could probably get around this too by making them arguments to hack(). For now it works for me.document.write(). I copied everything out of it and placed it into its own stylesheet.disqus_container_id(which you’ll need for the slide down effect anyway)That’s it! If you have any questions feel free to ask. You can look at my complete (production) javascript here.