Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
142
rated 0 times [  144] [ 2]  / answers: 1 / hits: 12400  / 10 Years ago, mon, december 1, 2014, 12:00:00

I am using urlive library to load thumbnail images using the link.



Outside of a Chrome extension the functionality works perfect. But while running the same functionality in a Chrome extension I was getting the error:




Refused to load the script 'http://query.yahooapis.com/v1/public/yql?callback=jQuery1111091462301090359…22+and+xpath%3D%22*%22+and+compat%3D%22html5%22&format=xml&_=1417426473922' because it violates the following Content Security Policy directive: script-src 'self' 'unsafe-eval'.




$(document).ready(function() {
$('#thumbnail_url').on('input propertychange', function () {
console.log('called');
$('#thumbnail_url').urlive({
callbacks: {
onStart: function () {
console.log('called1');
$('.loading').show();
$('.urlive-container').urlive('remove');
},
onSuccess: function (data) {
$('.loading').hide();
$('.urlive-container').urlive('remove');
},
noData: function () {
$('.loading').hide();
$('.urlive-container').urlive('remove');
}
}
});
}).trigger('input');
});


I have tried all the possibilities. But I did not get the answer. Still the error raising for me while calling the yahooapis.


More From » jquery

 Answers
9

If you are dealing with the chromeapp then forget about urlive library. The 'urlive` will take the yahooapis and the yahooapis doesn't work on building the chrome app. It keeps raising the error. So better go with other library.


[#40907] Saturday, November 29, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
julian

Total Points: 159
Total Questions: 105
Total Answers: 94

Location: Chad
Member since Mon, Dec 5, 2022
1 Year ago
;