-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (68 loc) · 2.31 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
<head>
<title>Redacted Font Bookmarklet</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body {
font-family: sans-serif;
overflow-wrap: break-word;
hyphens: auto;
}
main {
margin: 50px auto;
max-width: 450px;
padding: 0 10px;
}
a {
color: cadetblue;
text-decoration: none;
}
.bookmarklet-button-container {
display: flex;
justify-content: center;
margin: 30px 0 40px;
}
.bookmarklet-button {
font-weight: 700;
font-size: 2rem;
text-decoration: none;
background-color: cadetblue;
color: white;
padding: 5px 20px;
border-radius: 10px;
transition: all 100ms ease-in-out;
}
.bookmarklet-button:hover {
transform: scale(1.1);
}
</style>
</head>
<body>
<main>
<h1>Redacted Font Bookmarklet</h1>
<p>
<a
href="https://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks"
target="_blank"
rel="noreferrer"
>Bookmarklet</a>
<span> to toggle overriding the page's font with </span>
<a
href="https://github.com/christiannaths/redacted-font"
target="_blank"
rel="noreferrer"
>Redacted Script Fonts</a><span>.</span>
<p>Drag the button over to the bookmark bar to make it available for usage.</p>
<div class="bookmarklet-button-container">
<a
title="Redact"
class="bookmarklet-button"
href="javascript:(function(){const styleId='texts-redacted';let styleElement=document.getElementById(styleId);if(!styleElement){const styleElement=document.createElement('style');styleElement.id=styleId;styleElement.textContent='@import url(\'https://fonts.googleapis.com/css2?family=Redacted+Script:wght@300;400;700&display=swap\'); * { font-family: \'Redacted Script\' !important; } img,svg,canvas { filter: blur(1px) grayscale(80%); }';document.head.appendChild(styleElement)}else{document.head.removeChild(styleElement)}})()"
>
Redact
</a>
</div>
<p>Once added, go to any website and click on the bookmarklet to toggle the redacted font.</p>
</main>
</body>
</html>