File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,10 @@ export async function loadRenderIframeContent(iframe: HTMLIFrameElement) {
2020      throw  new  Error ( `Unknown gitea iframe cmd: ${ cmd }  ) ; 
2121    } 
2222  } ) ; 
23- 
24-   let  urlParams  =  '' ; 
25-   urlParams  +=  `&gitea-is-dark-theme=${ isDarkTheme ( ) }  ; 
26-   urlParams  +=  `&gitea-iframe-id=${ iframe . id }  ; 
27-   iframe . src  =  iframeSrcUrl  +  ( iframeSrcUrl . includes ( '?' )  ? '&'  : '?' )  +  urlParams . substring ( 1 ) ; 
23+   iframe . src  =  iframeSrcUrl  +  ( iframeSrcUrl . includes ( '?' )  ? '&'  : '?' )  +  String ( new  URLSearchParams ( [ 
24+     [ 'gitea-is-dark-theme' ,  String ( isDarkTheme ( ) ) ] , 
25+     [ 'gitea-iframe-id' ,  iframe . id ] , 
26+   ] ) ) ; 
2827} 
2928
3029export  function  initMarkupRenderIframe ( el : HTMLElement )  { 
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ FILE_EXTENSIONS = .in-iframe
66RENDER_CONTENT_MODE = iframe 
77RENDER_COMMAND = `echo '<div style="width: 100%; height: 2000px; border: 10px solid red; box-sizing: border-box;"><a href="/">a link</a> <a target="_blank" href="//gitea.com">external link</a></div>'` 
88
9+ ;RENDER_COMMAND = cat /path/to/file.pdf 
10+ ;RENDER_CONTENT_SANDBOX = disabled 
11+ 
912*/ 
1013
1114function  mainExternalRenderIframe ( )  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments