Fixes #160 - Disable search redirects by default (sorry... 🙂)
This commit is contained in:
parent
bd783485a8
commit
fbc16cbb89
|
@ -514,3 +514,25 @@ hr {
|
|||
background-color: var(--active);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.new-badge {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.new-badge[data-new-badge]:after {
|
||||
content: "New!";
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -42px;
|
||||
font-size: 0.9em;
|
||||
background: var(--active);
|
||||
color: white;
|
||||
width: 35px;
|
||||
height: 18px;
|
||||
text-align: center;
|
||||
line-height: 18px;
|
||||
border-radius: 25px;
|
||||
padding: 2px;
|
||||
box-shadow: 0 0 1px var(--bg-secondary);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
@ -525,9 +525,16 @@ browser.webRequest.onBeforeRequest.addListener(
|
|||
);
|
||||
|
||||
browser.runtime.onInstalled.addListener((details) => {
|
||||
browser.storage.sync.get(["disableSearchEngine"], (result) => {
|
||||
if (result.disableSearchEngine === undefined) {
|
||||
browser.storage.sync.set({
|
||||
disableSearchEngine: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
if (details.reason === "update") {
|
||||
browser.storage.sync.get(
|
||||
["whitelist", "exceptions", "invidiousInstance"],
|
||||
["whitelist", "exceptions", "invidiousInstance", "disableSearchEngine"],
|
||||
(result) => {
|
||||
if (result.whitelist) {
|
||||
let whitelist = result.whitelist.map((e) =>
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<h1 data-localise="__MSG_disableSearchEngine__">
|
||||
<h1 data-localise="__MSG_disableSearchEngine__" class="new-badge" data-new-badge>
|
||||
Search Engine Redirects
|
||||
</h1>
|
||||
</td>
|
||||
|
|
|
@ -142,7 +142,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<h1 data-localise="__MSG_disableSearchEngine__">
|
||||
<h1
|
||||
data-localise="__MSG_disableSearchEngine__"
|
||||
class="new-badge"
|
||||
data-new-badge
|
||||
>
|
||||
Search Engine Redirects
|
||||
</h1>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue