tsi / inlineDisqussions

Inline comments for your site.
http://tsi.github.io/inlineDisqussions
MIT License
183 stars 29 forks source link

Error: 01:49:14.832 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. #26

Closed IAmAlfred closed 8 years ago

IAmAlfred commented 8 years ago

I've done everything in the instructions, included all js, css, jquery and called whatever was supposed to be called according to the guide.

I then removed the following from my page: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> and kept the correct version: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

This lead to an error in the console:

ReferenceError: jQuery is not defined inlineDisqussions.js:291:0

And I haven't even touched any code in the .js file, any solutions?

tsi commented 8 years ago

Any chance you're calling jQuery after calling inlineDisqussions ?

IAmAlfred commented 8 years ago

Nope; http://i.imgur.com/eJ8fzb1.png and this is the result I'm receiving: http://i.imgur.com/NQGCnNp.png

tsi commented 8 years ago

You should not be calling JS files directly from your file system (e.g. file://), I think that is what's causing your issues. You should have a server, even if it's a local one, that answer these requests. For testing, you can call inlineDisqussions using: <script src="https://raw.githubusercontent.com/tsi/inlineDisqussions/master/inlineDisqussions.js"></script>

IAmAlfred commented 8 years ago

Well I got rid of the error message here: http://i.imgur.com/v7xV6o8.png by simply using the following: $.ajaxPrefilter(function( options, originalOptions, jqXHR ) { options.async = true; });

But Disqus is still not loading, here are my disqus settings:

disqus_shortname = 'StoriesRUs'; jQuery(document).ready(function() { jQuery("p").inlineDisqussions({ identifier: 'disqussion', displayCount: true, highlighted: true, position: 'left', background: 'white', maxWidth: 9999 }); });

tsi commented 8 years ago

Can you share the page? can we see it? I'm not sure the error and the disqus issue are even related.

IAmAlfred commented 8 years ago

Website: http://sterlingsanya.esy.es/home/gitty.html Here's the code: http://pastebin.com/ZPU9rqpN

UPDATE: Oh wow, it appears that disqus loads on a server, interesting.(I'm inexperienced sorry!) HOWEVER, it only shows signs of loading, the actual disqus comment box doesn't load due to the error "unable to load disqus" (which didn't show previously on my desktop).

IAmAlfred commented 8 years ago

Does anyone know anything about this problem?

tsi commented 8 years ago

Looks like a problem with your disquss account, if I load this codepen (which works fine) with your disqus_shortname it returns an error.

IAmAlfred commented 8 years ago

Awesome, thank you Tsi ^.^ #GreeceFTW