Skip to content

Commit 28c4c79

Browse files
committed
feat: Add DMCA protection badge
1 parent 586c67a commit 28c4c79

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
RV_API_URL=https://api.revanced.app
2-
RV_GOOGLE_TAG_MANAGER_ID=
2+
RV_GOOGLE_TAG_MANAGER_ID=
3+
RV_DMCA_GUID=

src/layout/Footer/FooterHost.svelte

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@
88
import Query from '$lib/components/Query.svelte';
99
import FooterSection from './FooterSection.svelte';
1010
11+
import { RV_DMCA_GUID } from '$env/static/public';
12+
import { onMount } from 'svelte';
13+
1114
const aboutQuery = createQuery(['about'], queries.about);
15+
16+
onMount(() => {
17+
// DMCA Protection Badge
18+
var c = document.createElement('link');
19+
c.type = 'text/css';
20+
c.rel = 'stylesheet';
21+
c.href = 'https://images.dmca.com/badges/dmca.css?ID=' + RV_DMCA_GUID;
22+
var h = document.getElementsByTagName('head')[0];
23+
h.appendChild(c);
24+
});
1225
</script>
1326

1427
<!-- squiggly divider line -->
@@ -64,15 +77,28 @@
6477
</Query>
6578
</section>
6679
</div>
67-
<Query query={aboutQuery} let:data>
68-
{#if data}
69-
<div class="footer-bottom">
70-
<div id="logo-name"><span>Re</span>Vanced</div>
71-
<a href="/donate"><div>Donate</div></a>
80+
<div class="footer-bottom">
81+
<div id="logo-name"><span>Re</span>Vanced</div>
82+
<a href="/donate"><div>Donate</div></a>
83+
<Query query={aboutQuery} let:data>
84+
{#if data}
7285
<a href="mailto:{data.about.contact.email}"><div>Email</div></a>
73-
</div>
74-
{/if}
75-
</Query>
86+
{/if}
87+
</Query>
88+
<!-- DMCA Protection Badge -->
89+
<a
90+
href="//www.dmca.com/Protection/Status.aspx?ID={RV_DMCA_GUID}"
91+
title="DMCA.com Protection Status"
92+
class="dmca-badge"
93+
>
94+
<img
95+
src="https://images.dmca.com/Badges/dmca-badge-w150-5x1-08.png?ID={RV_DMCA_GUID}"
96+
alt="DMCA.com Protection Status"
97+
/></a
98+
>
99+
<script src="https://images.dmca.com/Badges/DMCABadgeHelper.min.js">
100+
</script>
101+
</div>
76102
</footer>
77103

78104
<style>
@@ -96,6 +122,11 @@
96122
align-items: center;
97123
}
98124
125+
.dmca-badge {
126+
display: flex;
127+
align-items: center;
128+
}
129+
99130
@media screen and (max-width: 768px) {
100131
.footer-bottom {
101132
flex-wrap: wrap;
@@ -143,7 +174,7 @@
143174
align-items: flex-start;
144175
}
145176
146-
img {
177+
.logo-image {
147178
height: 2.5rem;
148179
}
149180

0 commit comments

Comments
 (0)