# Links without sub-folder path in embedded comments (Continue Discussion and user links)

**URL:** <https://meta.discourse.org/t/links-without-sub-folder-path-in-embedded-comments-continue-discussion-and-user-links/37836>\
**Category:** Bug\
**Created:** [12 Gennaio 2016, 3:08pm UTC](https://meta.discourse.org/t/links-without-sub-folder-path-in-embedded-comments-continue-discussion-and-user-links/37836 "2016-01-12T15:08:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Strikki\_Strik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/strikki_strik/32/121984_2.png) [@Strikki\_Strik](https://meta.discourse.org/u/Strikki_Strik)\
**Post date:** [12 Gennaio 2016, 5:22pm UTC](https://meta.discourse.org/t/links-without-sub-folder-path-in-embedded-comments-continue-discussion-and-user-links/37836/2 "2016-01-12T17:22:35Z")

</div>

A quick and dirty work-around I can come up with is the following:  
add this javascript to Discourse embedded code so the full Discourse code will be:

```
DiscourseEmbed = { discourseUrl: 'http://nsr24.com/social/en/',
                   discourseEmbedUrl: window.location.href };

(function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);

    // Temporary work around
    setTimeout(function () {
        $('#discourse-embed-frame').contents().find("a").each(function () {
            var value = $(this).attr('href');
            if (!value.startsWith('http')) {
                $(this).attr('href', 'http://nsr24.com/social/en' + value);
            }
        })
    }, 3000);
})();

```

Hope this help later in debugging this problem.

---

_[View the full topic](https://meta.discourse.org/t/links-without-sub-folder-path-in-embedded-comments-continue-discussion-and-user-links/37836)._
