diff options
author | Vika <vika@fireburn.ru> | 2022-10-03 17:45:22 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-10-03 17:45:22 +0300 |
commit | 0e0d711a9d524c445a61a05831a824ac7080f3b8 (patch) | |
tree | 66fcd25abd802fb9fd74aadbc3293c3a34ccf940 /kittybox-rs/src | |
parent | 568f98589b6c30bb3f807517d28039b12dd54be3 (diff) | |
download | kittybox-0e0d711a9d524c445a61a05831a824ac7080f3b8.tar.zst |
LibreJS compatibility
I don't know how worthwhile that was, given that LibreJS developers themselves don't care to properly declare licenses on the Bazaar frontend they use to host the extension's source code on the Web 🤡
Diffstat (limited to 'kittybox-rs/src')
-rw-r--r-- | kittybox-rs/src/frontend/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kittybox-rs/src/frontend/mod.rs b/kittybox-rs/src/frontend/mod.rs index 970a09b..58de39d 100644 --- a/kittybox-rs/src/frontend/mod.rs +++ b/kittybox-rs/src/frontend/mod.rs @@ -283,9 +283,11 @@ const INDIEAUTH_JS: &[u8] = include_bytes!(concat!( const LIB_JS: &[u8] = include_bytes!(concat!( env!("OUT_DIR"), "/", "kittybox_js", "/", "lib.js" )); +const JSLABELS_HTML: &[u8] = include_bytes!("../../javascript/jslicense.html"); const MIME_JS: &str = "application/javascript"; const MIME_CSS: &str = "text/css"; const MIME_PLAIN: &str = "text/plain"; +const MIME_HTML: &str = "text/html; charset=utf-8"; pub async fn statics(Path(name): Path<String>) -> impl IntoResponse { use axum::http::header::CONTENT_TYPE; @@ -296,6 +298,7 @@ pub async fn statics(Path(name): Path<String>) -> impl IntoResponse { "onboarding.css" => (StatusCode::OK, [(CONTENT_TYPE, MIME_CSS)], ONBOARDING_CSS), "indieauth.js" => (StatusCode::OK, [(CONTENT_TYPE, MIME_JS)], INDIEAUTH_JS), "lib.js" => (StatusCode::OK, [(CONTENT_TYPE, MIME_JS)], LIB_JS), + "jslicense.html" => (StatusCode::OK, [(CONTENT_TYPE, MIME_HTML)], JSLABELS_HTML), _ => ( StatusCode::NOT_FOUND, [(CONTENT_TYPE, MIME_PLAIN)], |