From 0e0d711a9d524c445a61a05831a824ac7080f3b8 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 3 Oct 2022 17:45:22 +0300 Subject: LibreJS compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 🤡 --- kittybox-rs/src/frontend/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kittybox-rs/src/frontend') 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) -> impl IntoResponse { use axum::http::header::CONTENT_TYPE; @@ -296,6 +298,7 @@ pub async fn statics(Path(name): Path) -> 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)], -- cgit 1.4.1