here's my solution:
var id = context.id;
disqus_shortname = 'somename',
disqus_identifier = id,
disqus_title = id,
disqus_url = "http://someurl.com/#!" + id;
if ($('head script[src="http://' + disqus_shortname + '.disqus.com/embed.js"]').length == 0) {
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0]).appendChild(dsq);
})();
}
if (typeof DISQUS != "undefined") {
DISQUS.reset({
reload: true,
config: function () {
this.page.identifier = id;
this.page.url = "http://someurl.com/#!" + id;
}
});
}