Skip to content

Commit c760259

Browse files
committed
european access of certain control is molecular
1 parent c1a787c commit c760259

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

icon/material-icons.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<meta charset="UTF-8">
1313
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1414
<title>Local Internet</title>
15-
<link rel="stylesheet" href="/icon/material-icons.css">
15+
<link rel="stylesheet" href="icon/material-icons.css">
1616
</head>
1717
<body>
1818
<main>
@@ -56,7 +56,7 @@
5656
const btnFullscreen=$('#browser_fullscreen');
5757
const sanitizePath=input=>{if(!input.startsWith('web://'))input='web://'+input.replace(/^web:\/+/,'');input=input.replace(/^web:\/\/+/,'web://');input=input.replace(/([^:])\/\/+/g,'$1/');if(input.endsWith('/')&&input!=='web://')input=input.slice(0,-1);return input;};
5858
const pathToSrc=path=>{path=path.replace(/^web:\/\//,'');if(path==='')return'website/'+HOME+'/index.html';if(path.endsWith('/'))path=path.slice(0,-1);const slashIndex=path.indexOf('/');let domain,childPath;if(slashIndex===-1){domain=path;childPath='';}else{domain=path.substring(0,slashIndex);childPath=path.substring(slashIndex+1);}let finalPath='website/'+domain;if(childPath===''||!childPath.includes('.')){finalPath+=(childPath?'/'+childPath:'')+'/index.html';}else{finalPath+='/'+childPath;}return finalPath;};
59-
$on(frame,'load',()=>{try{const path=frame.contentWindow.location.pathname;let displayPath=path.replace(/^.*\/website\//,'');input.value=sanitizePath(displayPath);const link=frame.contentDocument.createElement('link');link.rel='stylesheet';link.href='/icon/material-icons.css';frame.contentDocument.head.appendChild(link);const s=frame.contentDocument.createElement('script');s.src='/inject.js';frame.contentDocument.head.appendChild(s);}catch(e){input.value='[blocked]';}});
59+
$on(frame,'load',()=>{try{const path=frame.contentWindow.location.pathname;let displayPath=path.replace(/^.*\/website\//,'');input.value=sanitizePath(displayPath);const link=frame.contentDocument.createElement('link');link.rel='stylesheet';link.href=new URL('icon/material-icons.css',window.location.href).href;frame.contentDocument.head.appendChild(link);const s=frame.contentDocument.createElement('script');s.src=new URL('inject.js',window.location.href).href;frame.contentDocument.head.appendChild(s);}catch(e){input.value='[blocked]';}});
6060
$on(navForm,'submit',e=>{e.preventDefault();const sanitized=sanitizePath(input.value.trim());input.value=sanitized;frame.src=pathToSrc(sanitized);});
6161
$on(btnHome,'click',()=>{frame.src='website/'+HOME+'/';});
6262
$on(btnBack,'click',()=>{frame.contentWindow.history.back();});

0 commit comments

Comments
 (0)