Подключен фронтенд на WebAssembly
Этот коммит содержится в:
родитель
bebbfb3ad9
Коммит
9b9fb7fff5
20
main.html
20
main.html
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru-RU">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Переадресация Корпоративного портала</title>
|
||||
<link rel="stylesheet" href="/styles.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h2>Переадресация Корпоративного портала</h2>
|
||||
<div id="switch-button">
|
||||
<label for="ru-to-local">RU на LOCAL</label>
|
||||
<label for="no-redirect">Отключить</label>
|
||||
<label for="local-to-ru">LOCAL на RU</label>
|
||||
</div>
|
||||
<input id="ru-to-local" type="radio" name="switch-redirect" value="ru-to-local" />
|
||||
<input id="no-redirect" type="radio" name="switch-redirect" value="no-redirect" />
|
||||
<input id="local-to-ru" type="radio" name="switch-redirect" value="local-to-ru" />
|
||||
<script src="/popup.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -14,7 +14,7 @@
|
||||
"service_worker": "/background.js"
|
||||
},
|
||||
"action": {
|
||||
"default_popup": "/main.html"
|
||||
"default_popup": "/public/index.html"
|
||||
},
|
||||
"declarative_net_request": {
|
||||
"rule_resources": [
|
||||
@ -24,5 +24,8 @@
|
||||
"path": "/rules.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"content_security_policy": {
|
||||
"extension_pages": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'"
|
||||
}
|
||||
}
|
||||
|
3
popup.js
3
popup.js
@ -1,3 +0,0 @@
|
||||
document.querySelector('#ru-to-local').onchange = () => chrome.storage.local.set({ redirectMode: 1 })
|
||||
document.querySelector('#local-to-ru').onchange = () => chrome.storage.local.set({ redirectMode: 2 })
|
||||
document.querySelector('#no-redirect').onchange = () => chrome.storage.local.set({ redirectMode: 3 })
|
46
styles.css
46
styles.css
@ -1,46 +0,0 @@
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
width: 24rem;
|
||||
background-image: linear-gradient(to bottom right, blue, darkblue);
|
||||
color: white;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#switch-button {
|
||||
display: flex;
|
||||
margin-top: 2rem;
|
||||
width: fit-content;
|
||||
border: solid .0125rem transparent;
|
||||
border-radius: 2rem;
|
||||
box-shadow:
|
||||
0 max(.25rem, .25vw) max(.5rem, .5vw) max(.1875rem, .1875vw) rgba(0, 0, 0, .15),
|
||||
0 max(.0625rem, .0625vw) max(.1875rem, .1875vw) rgba(0, 0, 0, .3);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
#switch-button > * {
|
||||
padding: .5rem 1rem;
|
||||
background-color: white;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
#switch-button > :hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#switch-button > :not(:first-child) {
|
||||
border-left: solid .0125rem black;
|
||||
}
|
Загрузка…
Ссылка в новой задаче
Block a user