jquery - Ajax JSONP refuses to execute code because of MIME type -


i'v been trying make script checks reddit page , sends titles of posts. able use

$( "#foo" ).load( "https://www.reddit.com/r/csgobetting/search?q=flair%3amatch&sort=new&restrict_sr=on&t=all&feature=legacy_search #sitetable .thing .title a:even" ) 

but have use chrome extension , want avoid @ costs. (it gives me no 'access-control-allow-origin' header present error in console)

other thing tryed

$.ajax({     url: "https://www.reddit.com/r/csgobetting/search?q=flair%3amatch&sort=old&restrict_sr=on&t=all&feature=legacy_search",     jsonp: "callback",     datatype: "jsonp",     success: function(data){         data=$(data).find('#sitetable > div.thing.id-t3_3m2ezw.linkflair.linkflair-match.odd.link.self > div.entry.unvoted > p.title > ');         $('#foo').append(  data );     } }); 

but gives me error:

refused execute script 'https://www.reddit.com/r/cs...' because mime type ('text/html') not executable, , strict mime type checking enabled.

i'v looked on internet 3 hours couldnt find me.

also not duplicate this post didint me.

my goal page titles links without using extensions or security disabling parameters.

best way curl , download html content of url echo javascript want :d , or of in php great plugin : https://code.google.com/p/phpquery/wiki/selectors


Comments