$("#sidebar_loader").show().addClass("delayed-fade-in");
- // IE<10 doesn't respect Vary: X-Requested-With header, so
- // prevent caching the XHR response as a full-page URL.
- if (content_path.indexOf("?") >= 0) {
- content_path += "&xhr=1";
- } else {
- content_path += "?xhr=1";
- }
-
$("#sidebar_content")
.empty();
var position = $("html").attr("dir") === "rtl" ? "topleft" : "topright";
function addControlGroup(controls) {
- controls.forEach(function (control) {
- control.addTo(map);
- });
+ for (const control of controls) control.addTo(map);
var firstContainer = controls[0].getContainer();
$(firstContainer).find(".control-button").first()
fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
.then(callback)
.catch(function () {
+ // eslint-disable-next-line no-alert
alert(I18n.t("site.index.remote_failed"));
});
}