I am making a mozilla extension, to notify me when an event happen in a specific web page, the problem is that I am doing a POST request using jquery, but it doesn't work.
here is that part of the code (I use it in content.js)
var xhrt = $.post( "https://api.pushed.co/1/push", function( dataToPush ) {
alert( "success" );
},
)
.done(function() {
alert( "second success" );
})
.fail(function(xhr, textStatus, error) {
alert( "error2" );
console.log(error+"")
})