-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurlmkrAgreement.js
198 lines (165 loc) · 11 KB
/
urlmkrAgreement.js
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
const termsAndConditions = `
<h2>Terms of Service</h2>
<p><strong>Effective Date:</strong> [01.01.2025]</p>
<h2>1. Introduction</h2>
<p>Welcome to snofl.com <strong>urlmkr</strong> (the “Service”). This website and its related services (collectively,“snofl.com”)
are an experimental, personal project created and maintained by a private individual (the “Owner”). By using snofl.com and urlmkr tool, you agree to comply
with these Terms of Service (“Terms”).</p>
<h2>2. Description of the Service</h2>
<p>urlmkr is a tool that allows users to create custom, shortened, and encrypted URLs (“Generated URLs”), which may include:</p>
<ul>
<li>Embedding or linking images, text, or events (including nostr events).</li>
<li>Storing the mapping of shortened URLs to longer URLs on our servers.</li>
<li>Auto-removal of URLs that receive no visits for <strong>six (6)</strong> consecutive months.</li>
<li>Encryption capabilities to protect the privacy of the content contained in the Generated URLs.</li>
</ul>
<h2>3. Acceptance of the Terms</h2>
<p>By accessing or using snofl.com urlmkr tool, you acknowledge that you have read, understood, and agree to be bound by these Terms. If you do
not agree, you may not use the Service.</p>
<h2>4. User Responsibilities</h2>
<ul>
<li><strong>Lawful Use:</strong> You agree not to use urlmkr for any illegal or malicious purposes, including, but not limited
to, distributing malware, phishing, violating intellectual property rights, or facilitating harmful or fraudulent activities.</li>
<li><strong>Content Ownership:</strong> You are solely responsible for all content you include in the Generated URLs. You warrant
that you have all necessary rights and permissions to use and distribute such content.</li>
<li><strong>Respecting Privacy:</strong> You must not share any private or personal information of an individual without that
individual’s explicit consent.</li>
<li><strong>Respecting Copyright and Intellectual Property:</strong> You must not share copyrighted or plagiarized content or
any content that violates third-party intellectual property rights.</li>
<li><strong>Encrypted URLs:</strong> If you use the encryption feature, you are responsible for maintaining the confidentiality
of any decryption keys or methods.</li>
<li><strong>Reporting Misuse:</strong> You agree to promptly report any malicious or illegal content you discover via snofl.com to the
Owner. If the URL is encrypted, you must provide sufficient evidence that it contains illegal or malicious content.</li>
</ul>
<h2>5. Prohibited Activities</h2>
<p>You agree <strong>not</strong> to use urlmkr to:</p>
<ul>
<li>Violate any applicable law or regulation.</li>
<li>Promote or engage in hate speech, harassment, threats, or abuse.</li>
<li>Publish or share any private or personal information without consent.</li>
<li>Publish or share any copyrighted or plagiarized content without permission or legal right.</li>
<li>Publish or share content that exploits or harms minors, including child sexual abuse material (CSAM) or any other form of content depicting or promoting abuse of children.</li>
<li>Commit or further fraudulent or otherwise harmful acts.</li>
</ul>
<h2>6. Removal of Content and Termination</h2>
<ul>
<li><strong>Auto-Removal Policy:</strong> Generated URLs that receive no visits for six (6) consecutive months will be automatically removed.</li>
<li><strong>Owner’s Right to Remove Content:</strong> The Owner reserves the right, but not the obligation, to remove or block access
to any Generated URLs reported or determined to contain illegal or malicious content.</li>
<li><strong>Termination:</strong> The Owner may terminate or suspend access to urlmkr at any time, without prior notice, for
violating these Terms or any applicable law.</li>
</ul>
<h2>7. Cooperation With Authorities</h2>
<p>You acknowledge and agree that the Owner may cooperate with law enforcement and governmental agencies if your use of the Service
is under investigation for any suspected illegal or malicious activity. This may include disclosing any user-provided information
as required by law or a lawful subpoena, court order, or similar legal process.</p>
<h2>8. Disclaimer of Warranties</h2>
<p><strong>urlmkr is provided on an “AS IS” and “AS AVAILABLE” basis.</strong></p>
<ul>
<li>The Owner disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability,
fitness for a particular purpose, and non-infringement.</li>
<li>The Owner does not guarantee that the Service will be error-free, secure, or uninterrupted, or that any defects will be corrected.</li>
</ul>
<h2>9. Limitation of Liability</h2>
<p>To the fullest extent permitted by law, <strong>the Owner</strong> shall not be liable for:</p>
<ul>
<li>Any indirect, incidental, special, or consequential damages arising out of or related to your use or inability to use urlmkr.</li>
<li>Any loss of data, loss of profits, or other commercial damages.</li>
<li>Any content posted, stored, or uploaded by you or any third party using the Service.</li>
</ul>
<p>You acknowledge and agree that the Owner is <strong>not responsible for any misuse</strong> of the Service by you or any third party.</p>
<h2>10. Indemnification</h2>
<p>You agree to defend, indemnify, and hold harmless the Owner from and against any claims, liabilities, damages, losses, and expenses
(including legal and accounting fees) arising out of or in any way connected with your violation of these Terms, your misuse of snofl.com, urlmkr tool,
or your violation of any law or the rights of a third party.</p>
<h2>11. No Company or Commercial Enterprise</h2>
<p>You acknowledge that the Owner is <strong>not a company</strong> and that urlmkr is an <strong>experimental project</strong> offered
at the Owner’s personal discretion. No formal business entity is operating this Service.</p>
<h2>12. Governing Law and Jurisdiction</h2>
<p>These Terms shall be governed by and construed in accordance with the laws of [Your Country/State], without regard to conflict
of laws principles. Any disputes arising out of or in connection with these Terms shall be subject to the exclusive jurisdiction
of the courts in [Your Country/State].</p>
<h2>13. Changes to These Terms</h2>
<p>The Owner may revise these Terms at any time. Any changes will be posted on this page, and the “Effective Date” at the top will
be updated. Your continued use of urlmkr after such changes signifies your acceptance of the new Terms.</p>
<h2>14. Contact Information</h2>
<p>If you have any questions or concerns about these Terms, or to report illegal or malicious content, please contact me on:</p>
<p><strong><a href="https://signal.me/#eu/MhhiDpAJwzngrTkJMp1LVEmTv3SaGc2WDlKD5603oOgiyCWpvXBHvbKg18tQhQOo" target="_blank">Signal</a></strong></p>
<hr>
<h1>Cookie Consent</h1>
<h2>1. Overview</h2>
<p>We use a cookie solely to remember if you have accepted or declined these Terms of Service. This cookie will remain valid
for <strong>one (1) year</strong> from the date of acceptance or declination.</p>
<h2>2. Purpose of Cookie</h2>
<ul>
<li><strong>Acceptance Tracking:</strong> The cookie lets us know whether you have agreed to our Terms, so you don’t have to
provide consent each time you visit.</li>
<li><strong>Declination Tracking:</strong> If you decline, we will remember that choice, which will prevent access to urlmkr.</li>
</ul>
<h2>3. Data Collected</h2>
<p>The cookie collects and stores only the fact of your acceptance or declination. No other personal data is collected by this cookie.</p>
<h2>4. Managing Cookies</h2>
<ul>
<li>You can delete or block cookies via your browser settings at any time. However, doing so may result in losing your consent preferences.</li>
<li>If you delete the cookie, you will be asked again to accept or decline these Terms.</li>
</ul>
<h2>5. Changes to This Cookie Policy</h2>
<p>I may update this Cookie Consent policy and Terms of Service from time to time. Any changes will be posted on this page with an updated
“Effective Date.”</p>
<hr>
<p><strong style="font-size: 1.4rem;">By using urlmkr, you acknowledge that you have read and agreed to these Terms of Service and our Cookie Consent Policy.</strong></p>
`;
document.addEventListener('DOMContentLoaded', () => {
const agreementModal = document.getElementById('agreementModal');
const acceptButton = document.getElementById('acceptAgreement');
const declineButton = document.getElementById('declineAgreement');
const agreementText = document.getElementById('agreementText');
// Inject the terms and conditions text
agreementText.innerHTML = termsAndConditions;
// Check if the user has already accepted or declined the agreement
const userAgreement = getCookie('userAgreement');
if (userAgreement === 'accepted') {
// Do nothing, user already agreed
return;
}
// Show the modal for declined or first-time visitors
agreementModal.style.display = 'block';
acceptButton.disabled = true; // Start with Accept button disabled
// Enable the accept button only after scrolling to the bottom of the terms
agreementText.addEventListener('scroll', () => {
const scrollTop = agreementText.scrollTop; // Current scroll position
const scrollHeight = agreementText.scrollHeight; // Total height of the scrollable content
const clientHeight = agreementText.clientHeight; // Visible height of the container
// Check if user has scrolled to the bottom
if (scrollTop + clientHeight >= scrollHeight - 1) { // Use "-1" to handle rounding issues
acceptButton.disabled = false; // Enable the button
} else {
acceptButton.disabled = true; // Disable the button if they scroll back up
}
});
// Accept button logic
acceptButton.addEventListener('click', () => {
setCookie('userAgreement', 'accepted', 365); // Valid for 1 year
agreementModal.style.display = 'none'; // Hide the modal
});
// Decline button logic
declineButton.addEventListener('click', () => {
setCookie('userAgreement', 'declined', 1); // Set a short-lived cookie for 1 day
window.location.href = 'index.html'; // Redirect to homepage
});
});
// Utility function to set a cookie
function setCookie(name, value, days) {
const date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); // Convert days to milliseconds
const expires = `expires=${date.toUTCString()}`;
document.cookie = `${name}=${value};${expires};path=/`;
console.log('Cookie expiration date:', date.toUTCString());
}
// Utility function to get a cookie
function getCookie(name) {
const value = `; ${document.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) return parts.pop().split(';').shift();
return null;
}