diff --git a/github-pullrequest-plugin/src/main/webapp/scripts/featureButton.js b/github-pullrequest-plugin/src/main/webapp/scripts/featureButton.js index fd6baa7c..115833b1 100644 --- a/github-pullrequest-plugin/src/main/webapp/scripts/featureButton.js +++ b/github-pullrequest-plugin/src/main/webapp/scripts/featureButton.js @@ -1,10 +1,12 @@ function callFeature(button, answerPlaceId, parameters) { - new Ajax.Request(button.action, { + fetch(button.action, { method: "post", - parameters: parameters, - onComplete: function (rsp) { - answerPlaceId.innerHTML = rsp.responseText; - } + headers: crumb.wrap({}), + body: new URLSearchParams(parameters), + }).then(rsp => { + rsp.text().then((responseText) => { + answerPlaceId.innerHTML = responseText; + }); }); return false; }