Project

General

Profile

Patch #43208 » 0001-Reduce-requests-for-issue-ID-username-and-Wiki-page-name-autocomplete-with-debounce.patch

Katsuya HIDAKA, 2025-09-15 08:37

View differences:

app/assets/javascripts/application-legacy.js
}
}
const remoteSearch = function(url, cb) {
const debounce = function(func, delay) {
let timeout;
return function(...args) {
const context = this;
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(context, args), delay);
};
}
const remoteSearch = debounce((url, cb) => {
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = function ()
{
......
};
xhr.open("GET", url, true);
xhr.send();
};
}, 300);
const tribute = new Tribute({
collection: [
(2-2/4)