mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-10 19:46:34 +03:00
Delete custom on-error page
This commit is contained in:
parent
9c5d3a5ea5
commit
88792658aa
|
@ -1,32 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html style="display: none; will-change: contents, display">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Обход ошибки</title>
|
||||
<style>
|
||||
html, body, ol, ul, li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
margin: 1em;
|
||||
}
|
||||
.nowrap {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
li {
|
||||
margin: 0.5em 1em;
|
||||
}
|
||||
a:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ol id="menuItems" class="nowrap"></ol>
|
||||
<script src="./index.js"></script>
|
||||
<script src="../lib/keep-links-clickable.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,30 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
chrome.runtime.getBackgroundPage( (bgWindow) =>
|
||||
bgWindow.apis.errorHandlers.installListenersOn(
|
||||
window, 'ERRM', async() => {
|
||||
|
||||
const [currentTab] = await new Promise((resolve) =>
|
||||
chrome.tabs.query({
|
||||
active: true,
|
||||
currentWindow: true,
|
||||
}, resolve)
|
||||
);
|
||||
|
||||
const itemsRoot = document.getElementById('menuItems');
|
||||
bgWindow.apis.menus.getItemsAsArray().forEach((item) => {
|
||||
|
||||
const li = document.createElement('li');
|
||||
li.innerHTML = `
|
||||
<a href>${item.title}</a>
|
||||
`;
|
||||
li.querySelector('a').href = item.getUrl(currentTab.url);
|
||||
itemsRoot.appendChild(li);
|
||||
|
||||
});
|
||||
|
||||
document.documentElement.style.display = 'initial';
|
||||
|
||||
}
|
||||
)
|
||||
);
|
Loading…
Reference in New Issue
Block a user