Skip to content

Commit

Permalink
[JENKINS-70907] Remove Prototype Ajax.Updater usage from `URICheckE…
Browse files Browse the repository at this point in the history
…ncodingMonitor` (#7952)

Co-authored-by: Basil Crow <me@basilcrow.com>
  • Loading branch information
timja and basil authored May 8, 2023
1 parent 7e14657 commit d33dd26
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ Behaviour.specify(
0,
function (element) {
var url = element.getAttribute("data-url");
var params = { value: "\u57f7\u4e8b" };
new Ajax.Updater("URICheckEncodingMonitor-message", url, {
method: "get",
parameters: params,
var params = new URLSearchParams({ value: "\u57f7\u4e8b" });
fetch(url + "?" + params).then((rsp) => {
rsp.text().then((responseText) => {
var message = document.getElementById(
"URICheckEncodingMonitor-message"
);
message.innerHTML = responseText;
});
});
}
);

0 comments on commit d33dd26

Please # to comment.