f81be96e59
- lib/common.py: shared run/load_json/save_json utilities - webui/api/common.py: _ok/_error response helpers - webui/static/htmx.min.js, json-enc.js: vendored frontend deps - scripts/update-vendor.sh: frontend vendor updater - vendor/acme.sh: bundled ACME client - .gitignore: add .playwright-mcp/ and opencode.json.pwenv
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))
|
|
}
|
|
})
|