I am trying to extend shorturl using the API in the entered script in the Safari extension:
$.getJSON('http://api.longurl.org/v2/expand?format=json&url=' + encodeURIComponent(href) + '&callback=?', function(data) { console.log(data); });
And I get the following error:
ReferenceError: Can't find variable: jQuery15103411371528636664_1298845652395
I tried a different API and got the same error, so I know this is not the case. Also, if I execute the same code from the console, I get a successful response. So this should be due to the fact that inside the implemented Safari script extension.
Any ideas?
source share