5ac69dfa7e
Vendor JS files to vendor/ with versioned names, symlinks in webui/static/ select active version. Update update-vendor.sh and AGENTS.md.
13 lines
321 B
JavaScript
13 lines
321 B
JavaScript
htmx.defineExtension('json-enc', {
|
|
onEvent: function(name, evt) {
|
|
if (name === 'htmx:configRequest') {
|
|
evt.detail.headers['Content-Type'] = 'application/json'
|
|
}
|
|
},
|
|
|
|
encodeParameters: function(xhr, parameters, elt) {
|
|
xhr.overrideMimeType('text/json')
|
|
return (JSON.stringify(parameters))
|
|
}
|
|
})
|