@@ -22,6 +22,7 @@ import {
2222 HOME_PAGE ,
2323 NOT_FOUND ,
2424 PROXIES ,
25+ SURF_TO_MISC ,
2526 bookmarks ,
2627} from "components/apps/Browser/config" ;
2728import { type ComponentProcessProps } from "components/system/Apps/RenderComponent" ;
@@ -134,13 +135,23 @@ const Browser: FC<ComponentProcessProps> = ({ id }) => {
134135 if ( isHtml ) setSrcDoc ( ( await readFile ( addressInput ) ) . toString ( ) ) ;
135136 setIcon ( id , processDirectory . Browser . icon ) ;
136137
137- if ( addressInput . toLowerCase ( ) . startsWith ( DINO_GAME . url ) ) {
138+ const loadLocalSite = ( localPath : string , localTitle : string ) : void => {
139+ iframeRef . current ?. removeAttribute ( "sandbox" ) ;
138140 changeIframeWindowLocation (
139- `${ window . location . origin } ${ DINO_GAME . path } ` ,
141+ `${ window . location . origin } ${ localPath } ` ,
140142 contentWindow
141143 ) ;
142- prependFileToTitle ( `${ DINO_GAME . url } /` ) ;
144+ prependFileToTitle ( localTitle ) ;
145+ } ;
146+ const lowerAddressInput = addressInput . toLowerCase ( ) ;
147+
148+ if ( lowerAddressInput . startsWith ( SURF_TO_MISC . url ) ) {
149+ loadLocalSite ( SURF_TO_MISC . path , SURF_TO_MISC . name ) ;
150+ } else if ( lowerAddressInput . startsWith ( DINO_GAME . url ) ) {
151+ loadLocalSite ( DINO_GAME . path , `${ DINO_GAME . url } /` ) ;
143152 } else if ( ! isHtml ) {
153+ iframeRef . current ?. setAttribute ( "sandbox" , IFRAME_CONFIG . sandbox ) ;
154+
144155 const processedUrl = await getUrlOrSearch ( addressInput ) ;
145156
146157 if (
0 commit comments