147 lines
4.4 KiB
HTML
147 lines
4.4 KiB
HTML
<head>
|
|
<title>domspace</title>
|
|
<link rel="stylesheet" href="style.css" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class='settings'>
|
|
<select name="dropdown" id="dropdown">
|
|
<option value="">set bg</option>
|
|
<option value="frogs">frogs</option>
|
|
<option value="mary">mary</option>
|
|
<option value="crystal">crystal</option>
|
|
<option value="konata">konata</option>
|
|
<option value="lain">lain</option>
|
|
<option value="sakura">sakura</option>
|
|
<option value="squirtle">squirtle</option>
|
|
<option value="dbz">dbz</option>
|
|
</select>
|
|
</div>
|
|
<div class="container">
|
|
<div class="link-container">
|
|
<div id="main" style='display:block'>
|
|
<a href="https://www.domdit.com" id="domdit" class="link">[d] domdit </a><br>
|
|
<a href="https://www.shrinkinminkin.com" id="shrinkin-minkin" class="link">[s] shrinkin-minkin </a><br>
|
|
<a href="https://transmission.domdit.com" id="transmission" class="link">[t] transmission </a><br>
|
|
<a href="https://git.domdit.com/" id="git" class="link">[g] git </a><br>
|
|
<a href="https://inbox.purelymail.com/?_task=mail&_mbox=INBOX" id="mail" class="link">[m] mail </a><br>
|
|
<a href="https://wiki.archlinux.org/" id="arch-wiki" class="link">[a] arch-wiki </a><br>
|
|
<a href="https://www.youtube.com" id="youtube" class="link">[y] youtube </a><br>
|
|
<a href="https://www.4chan.org" id="4chan" class="link">[f] 4chan </a><br>
|
|
</div>
|
|
|
|
<div id="torrents" style='display:none;'>
|
|
<a href="https://jpopsuki.eu/" class="link">[j] jpopsuki</a> <br>
|
|
<a href="https://avistaz.to/" class="link">[v] avistaz</a> <br>
|
|
<a href="https://nyaa.si/" class="link">[n] nyaa</a> <br>
|
|
</div>
|
|
|
|
<div id="other" style='display:none'>
|
|
<a href="https://dukenukemis.cool/" class="link">[i] icum.to</a> <br>
|
|
<a href="https://lukesmith.xyz/" class="link">[l] luke smith</a> <br>
|
|
<a href="https://digdeeper.club/" class="link">[p] digdeeper</a> <br>
|
|
|
|
</div>
|
|
|
|
<br>
|
|
<span style="font-size:14px">
|
|
<a href="#" class="link" onclick="toggleSection('main')">[1] main</a> |
|
|
<a href="#" class="link" onclick="toggleSection('torrents')">[2] torrents</a> |
|
|
<a href="#" class="link" onclick="toggleSection('other')">[3] other</a>
|
|
</span><br>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
<script>
|
|
|
|
function getCookie(cname) {
|
|
let name = cname + "=";
|
|
let decodedCookie = decodeURIComponent(document.cookie);
|
|
let ca = decodedCookie.split(';');
|
|
for(let i = 0; i <ca.length; i++) {
|
|
let c = ca[i];
|
|
while (c.charAt(0) == ' ') {
|
|
c = c.substring(1);
|
|
}
|
|
if (c.indexOf(name) == 0) {
|
|
return c.substring(name.length, c.length);
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
|
|
var bg = getCookie("bg")
|
|
console.log(bg)
|
|
if (bg != "" && bg != 'undefined') {
|
|
changeWallpaper(bg)
|
|
}
|
|
|
|
function changeWallpaper(bg) {
|
|
document.cookie = "bg=" + bg;
|
|
|
|
var bg_map = {
|
|
'frogs': 'frogs.jpg',
|
|
'mary': 'mary_and_gabriel.png',
|
|
'crystal': 'crystal.png',
|
|
'konata': 'konata.png',
|
|
'lain': 'lain.png',
|
|
'sakura': 'sakura.jpg',
|
|
'squirtle': 'squirtle.gif',
|
|
'dbz': 'dbz.png'
|
|
}
|
|
|
|
document.body.style.backgroundImage = "url('bg/"+ bg_map[bg] +"')";
|
|
}
|
|
|
|
document.getElementById("dropdown").addEventListener("change", function () {
|
|
if (this.value != "") {
|
|
changeWallpaper(this.value);
|
|
}
|
|
});
|
|
|
|
var key_map = {
|
|
'a': 'https://wiki.archlinux.org/',
|
|
'd': 'https://www.domdit.com',
|
|
'g': 'https://git.domdit.com/',
|
|
'j': 'https://jpopsuki.eu/',
|
|
'm': 'https://inbox.purelymail.com/?_task=mail&_mbox=INBOX',
|
|
'n': 'https://nyaa.si/',
|
|
's': 'https://www.shrinkinminkin.com',
|
|
't': 'https://transmission.domdit.com',
|
|
'v': 'https://avistaz.to/',
|
|
'y': 'https://www.youtube.com',
|
|
'f': 'https://www.4chan.org'
|
|
}
|
|
|
|
function toggleSection(section) {
|
|
var sections = ['main', 'torrents', 'other']
|
|
for (let i = 0; i < sections.length; i++) {
|
|
if (section == sections[i]) {
|
|
document.getElementById(sections[i]).style.display = 'block';
|
|
} else {
|
|
document.getElementById(sections[i]).style.display = 'none';
|
|
}
|
|
}
|
|
}
|
|
|
|
document.onkeypress = function (e) {
|
|
|
|
|
|
if (e.key == '1') {
|
|
toggleSection('main');
|
|
} else if (e.key == '2') {
|
|
toggleSection('torrents');
|
|
} else if (e.key == '3') {
|
|
toggleSection('other');
|
|
} else {
|
|
if (e.key in key_map) {
|
|
window.location.href = key_map[e.key];
|
|
}
|
|
}
|
|
};
|
|
|
|
|
|
</script>
|