From 07788b4e5ea96e6d5a8d0fc49aa8f0dac52bba88 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 30 Aug 2024 14:07:23 -0300 Subject: [PATCH] Inject vendor.js via loader --- packages/typescript/postman/src/postman/request.ts | 2 +- src/html/main/random.html.erb | 1 - src/html/main/redirect.html.erb | 1 - src/html/main/surah-index.html.erb | 1 - src/html/main/surah-stream.html.erb | 1 - src/js/loaders/SurahIndexLoader.ts | 11 +++++++---- src/js/loaders/SurahStreamLoader.ts | 11 +++++++---- src/js/main/surah-index.tsx | 5 +---- src/js/main/surah-stream.tsx | 5 +---- 9 files changed, 17 insertions(+), 21 deletions(-) diff --git a/packages/typescript/postman/src/postman/request.ts b/packages/typescript/postman/src/postman/request.ts index 7937ad3e7..11caec9d2 100644 --- a/packages/typescript/postman/src/postman/request.ts +++ b/packages/typescript/postman/src/postman/request.ts @@ -10,7 +10,7 @@ export default { const { href } = item; return fetch(href, options) .then((res) => res.text()) - .then((text) => ({ type: 'application/javascript', text })) + .then((text) => ({ type: 'application/javascript', text, ...item.props })) .then((props) => Object.assign(document.createElement('script'), props)); }, diff --git a/src/html/main/random.html.erb b/src/html/main/random.html.erb index 0d4990ad5..171f8fb52 100644 --- a/src/html/main/random.html.erb +++ b/src/html/main/random.html.erb @@ -18,7 +18,6 @@ <%= erb("_favicon.html.erb") %>
-