Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //function to make xmlhttprequests
- chrome.runtime.onMessage.addListener(function(request, sender, callback) {
- $.get(request.url, function() {
- }).done(function(data) {
- callback(data.responseText);
- }).fail(function() {
- callback();
- });
- return true; // prevents the callback from being called too early on return
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement