Pages

Friday, August 31, 2012

8

Small update to my threaded comments hack v2

If you have my threaded comments hack v2 installed, and it stopped threading the comments, it is because Blogger changed the navbar iframe src attribute handling. Seemed to happen yesterday. To fix that, edit the template and find line 235 of the hack, which used to be:

var cfeedbase = 'http://'+window.location.hostname+'/feeds/'+$("#navbar-iframe").attr("src").match(/targetPostID=([^&]*)/)[1]+'/comments'

and change it to:

var cfeedbase = $('link[href$="comments/default"]').attr("href").split("/default")[0];

(all in one line)

The source code has been updated in the hack's article.
See the hack
for this dynamic
views icon: