MCPcopy Index your code
hub / github.com/socketstream/socketstream / loadDisqus

Function loadDisqus

docs/js/docs.js:501–518  ·  view source on GitHub ↗
(currentPageId)

Source from the content-addressed store, hash-verified

499
500
501 function loadDisqus(currentPageId) {
502 if (!NG_DOCS.discussions) { return; }
503 // http://docs.disqus.com/help/2/
504 window.disqus_shortname = NG_DOCS.discussions.shortName;
505 window.disqus_identifier = currentPageId;
506 window.disqus_url = NG_DOCS.discussions.url + currentPageId;
507 window.disqus_developer = NG_DOCS.discussions.dev;
508
509 // http://docs.disqus.com/developers/universal/
510 (function() {
511 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
512 dsq.src = '//angularjs.disqus.com/embed.js';
513 (document.getElementsByTagName('head')[0] ||
514 document.getElementsByTagName('body')[0]).appendChild(dsq);
515 })();
516
517 angular.element(document.getElementById('disqus_thread')).html('');
518 }
519};
520
521function module(name, modules, optional) {

Callers 1

docs.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected