-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html
162 lines (136 loc) · 6.67 KB
/
404.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
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
<link rel="icon" type="image/x-icon" href="favicon.svg">
<!-- Google tag (gtag.js) -->
<script defer async src="https://www.googletagmanager.com/gtag/js?id=G-6HEHXVJ98S"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-6HEHXVJ98S');
</script>
</head>
<body>
<script defer>
function showStuff() {
const inputBox = document.getElementById("userInput");
inputBox.addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
setthestuff();;
}
});
var userDisplay = document.getElementById("userDisplay");
var userDisplay2 = document.getElementById("userDisplay2");
var linkValue = window.location.href.split("/");
var linkValue2 = linkValue[linkValue.length - 1].split("@");
if (linkValue2[2] === localStorage.getItem('user_instance')) {
var linkValue3 = localStorage.getItem('user_instance') + "/@" + linkValue2[1];
console.log("1");
} else if (localStorage.getItem('user_instance') === null) {
var linkValue3 = 'First Enter Your Instance Below';
console.log("2");
} else {
var linkValue3 = localStorage.getItem('user_instance') + "/@" + linkValue2[1] + '@' + linkValue2[2];
console.log("3");
}
if (localStorage.getItem('user_instance') === null) {
var hiddenDIV = document.getElementById("hidden");
hiddenDIV.classList.remove("hidden")
}
userDisplay.href = "https://" + linkValue3;
userDisplay.textContent = linkValue3;
userDisplay2.href = "https://" + linkValue2[2]+"/@"+linkValue2[1];
userDisplay2.textContent = linkValue2[2]+"/@"+linkValue2[1];
console.log(linkValue);
console.log(linkValue2);
console.log(linkValue3);
}
window.onload = showStuff;
function setthestuff() {
var userInput = document.getElementById("userInput").value;
console.log(userInput);
var userDisplay = document.getElementById("userDisplay");
var linkValue = userInput.split("/");
var shareValue = linkValue[1] + "@" + linkValue[0];
if (userInput.length > 0) {
userDisplay.href = shareValue;
userDisplay.textContent = "mastofind.me/" + shareValue;
console.log(userInput);
localStorage.setItem('user_instance', linkValue[0]);
localStorage.setItem('user_name', linkValue[1]);
showStuff();
var hiddenDIV = document.getElementById("hidden");
hiddenDIV.classList.add("hidden")
globalUsername = localStorage.getItem('user_name');
globalDomain = localStorage.getItem('user_instance');
}
let globalUsername = localStorage.getItem('user_name');
let globalDomain = localStorage.getItem('user_instance');
}
</script>
<img src="header.svg">
<div class="wide">
<h1>Find me on your Mastodon server at</h1>
<h1><a href="mastofind.me" id="userDisplay">mastofind.me</a></h1>
</div>
<div class="wide">
<h1>Or come to my server at</h1>
<h1><a href="mastofind.me" id="userDisplay2">mastofind.me</a></h1>
</div>
<div class="button-groupie hidden" id="hidden">
<div class="form-group">
<span>https://</span>
<input class="form-field" type="text" placeholder="domain.tld/@you" spellcheck="false" id="userInput">
</div>
<button class="btn" onclick="setthestuff()">
<span>Set Instance Domain</span>
<svg preserveAspectRatio="none" viewBox="0 0 132 45">
<g clip-path="url(#clip)" filter="url(#goo-big)">
<circle class="top-left" cx="49.5" cy="-0.5" r="26.5" />
<circle class="middle-bottom" cx="70.5" cy="40.5" r="26.5" />
<circle class="top-right" cx="104" cy="6.5" r="27" />
<circle class="right-bottom" cx="123.5" cy="36.5" r="26.5" />
<circle class="left-bottom" cx="16.5" cy="28" r="30" />
</g>
<defs>
<clipPath id="clip">
<rect width="132" height="45" rx="7" />
</clipPath>
</defs>
</svg>
</button>
</div>
<div>
<h2>What is <a href="https://mastofind.me">mastofind.me</a>?</h2>
<h3>This website provides an easy way to link to your Mastodon profile for others, without other people ending
up on a different server from their own</h3>
<h3>I.E it solves the problem of me sharing a <a
href="https://mastodon.social/@JayBigGuy10">mastodon.social/@JayBigGuy10</a> link to a user of
mstdn.social, spacey.space or any other server, where they would have to copy my @username@server to their
own app or website</h3>
<h3>Your server and username are stored entirely in your own local browser, and the source code can be viewed on
my github <a href="https://github.com/jaybigguy10/jaybigguy10.github.io">here</a></h3>
</div>
<svg width="0" height="0">
<defs>
<filter id="goo" x="-50%" width="200%" y="-50%" height="200%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="3" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 21 -7"
result="cm" />
</filter>
<filter id="goo-light" x="-50%" width="200%" y="-50%" height="200%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="1.25" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 21 -7"
result="cm" />
</filter>
<filter id="goo-big" x="-50%" width="200%" y="-50%" height="200%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="7" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 21 -7"
result="cm" />
</filter>
</defs>
</svg>
</body>
</html>