We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea28b33 commit 9e94317Copy full SHA for 9e94317
web_src/js/markup/render-iframe.ts
@@ -20,10 +20,11 @@ export async function loadRenderIframeContent(iframe: HTMLIFrameElement) {
20
throw new Error(`Unknown gitea iframe cmd: ${cmd}`);
21
}
22
});
23
- iframe.src = iframeSrcUrl + (iframeSrcUrl.includes('?') ? '&' : '?') + String(new URLSearchParams([
24
- ['gitea-is-dark-theme', String(isDarkTheme())],
25
- ['gitea-iframe-id', iframe.id],
26
- ]));
+
+ const u = new URL(iframeSrcUrl, window.location.origin);
+ u.searchParams.set('gitea-is-dark-theme', String(isDarkTheme()));
+ u.searchParams.set('gitea-iframe-id', iframe.id);
27
+ iframe.src = u.href;
28
29
30
export function initMarkupRenderIframe(el: HTMLElement) {
0 commit comments