Answer the question
In order to leave comments, you need to log in
$.getScript returns an error?
var content = '';
document.write = function(s) {
content += s;
};
$.getScript('http://www.reddit.com/domain/skattertech.com/new/.embed?limit=4&t=all&sort=new&style=off', function(){
$('body').append(content);
});
Refused to load the script ' www.reddit.com/domain/skattertech.com/new/.embed?l... ' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome -extension-resource:".
Answer the question
In order to leave comments, you need to log in
same-origin-policy is a cruel thing.
https://developer.chrome.com/extensions/contentSec...
If you need to inject exactly on the page, you can try:
var s = document.createElement('script');
s.src = url
s.async = true
document.getElementsByTagName('head')[0].appendChild(s)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question