Skip to content

Commit

Permalink
Push
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaNKtext committed Jun 12, 2021
1 parent 2ae4bf9 commit 0aecc86
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 207 deletions.
9 changes: 2 additions & 7 deletions api.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
const http = require('http');
const url = require('url');

const hostname = '127.0.0.1';
const postport = 3000;
const getport = 3001;

var a = [];

const postserver = http.createServer((req, res) => {
var q = url.parse(req.url, true).query;
var ip = req.headers["x-real-ip"];
Expand All @@ -33,17 +30,15 @@ const postserver = http.createServer((req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.end("");
});

const getserver = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'application/json');
res.setHeader('Access-Control-Allow-Origin', '*');
res.end(JSON.stringify(a));
});

postserver.listen(postport, hostname, () => {
console.log(`Server running at http://${hostname}:${postport}/`);
console.log(`Post server running at http://${hostname}:${postport}/`);
});
getserver.listen(getport, hostname, () => {
console.log(`Server running at http://${hostname}:${getport}/`);
console.log(`Get server running at http://${hostname}:${getport}/`);
});
19 changes: 1 addition & 18 deletions browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8" />
<title>owu! | Browsing</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<link rel="stylesheet" href="style/picnic.min.css">
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/font.css">
Expand All @@ -16,23 +16,6 @@
<script src="scripts/settings.js"></script>
<script src="scripts/jsloader.js"></script>
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>

<body>
Expand Down
19 changes: 1 addition & 18 deletions changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,12 @@
<meta charset="utf-8" />
<title>owu! | Changelog</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<link rel="stylesheet" href="style/picnic.min.css">
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/font.css">
<link rel="icon" href="favicon.png">
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>
<!--Top nav bar-->
<nav id="main-nav">
Expand Down
19 changes: 1 addition & 18 deletions faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,12 @@
<meta charset="utf-8" />
<title>owu! | FAQ</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<link rel="stylesheet" href="style/picnic.min.css">
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/font.css">
<link rel="icon" href="favicon.png">
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>
<!--Top nav bar-->
<nav id="main-nav">
Expand Down
1 change: 0 additions & 1 deletion google37e604bba7edd32f.html

This file was deleted.

19 changes: 1 addition & 18 deletions gradetest.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,14 @@

<head>
<title>If you found this, have a cookie!</title>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style/picnic.min.css">
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/font.css">
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>

<body style="background-image: url('skin/defaultbg.jpg');">
Expand Down
19 changes: 1 addition & 18 deletions history.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,14 @@
<head>
<title>owu! | Past Plays</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style/picnic.min.css">
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/font.css">
<script src="scripts/lib/localforage.min.js"></script>
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>
<!--Main Nav Bar-->

Expand Down
19 changes: 1 addition & 18 deletions hot.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>owu! | Popular</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style/picnic.min.css">
Expand All @@ -16,23 +16,6 @@
<script src="scripts/settings.js"></script>
<script src="scripts/jsloader.js"></script>
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>

<body>
Expand Down
78 changes: 60 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>owu! | Home</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style/picnic.min.css">
Expand All @@ -17,23 +17,6 @@
<script src="scripts/jsloader.js"></script>
<script src="scripts/lib/localforage.min.js"></script>
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>

<body>
Expand Down Expand Up @@ -144,6 +127,65 @@ <h2>Random Beatmaps<h2>
</div>
</div>
<script>
// what's happening
let tbody = document.getElementById("activity-list");
function formattime(date) {
let m;
return date.getHours() + ":" + ((m=date.getMinutes())<10?('0'+m):m);
}
function showActivity(records) {
records = records.reverse();
while (tbody.firstChild)
tbody.removeChild(tbody.firstChild);
for (let i=0; i<records.length && i<10; ++i) {
let tr = document.createElement("tr");
tbody.appendChild(tr);
function nexttd(content) {
let td = document.createElement("td");
tr.appendChild(td);
if (!content) return;
if (content.tagName)
td.appendChild(content);
else
td.innerText = content;
}
let b = records[i].ip.split(".");
b[0]="**";
if (b.length>3) b[3]="**";
nexttd(b.join("."));
let title = document.createElement("a");
title.innerText = records[i].title + " [" + records[i].version + "]";
title.title = records[i].title + " [" + records[i].version + "]";
if (records[i].sid == "undefined")
records[i].sid = undefined;
title.href = "search.html?q=" + (records[i].sid || records[i].title);
nexttd(title);
nexttd(records[i].combo + "x");
nexttd(parseInt(records[i].score).toLocaleString());
let acc = document.createElement("span");
acc.innerText = records[i].acc;
acc.className = records[i].grade;
nexttd(acc);
nexttd(records[i].mods);
nexttd(formattime(new Date(parseInt(records[i].time))));
}
}
let b={ip:"",title:"",version:"loading",score:0,combo:0,acc:0};
showActivity([b,b,b,b,b,b,b,b,b,b])
function refreshLivescore(){
let xhr = new XMLHttpRequest();
xhr.responseType = 'text';
xhr.open("GET", "https://3000-magenta-cockroach-8wmgi1ls.ws-us09.gitpod.io/");
xhr.onload = function() {
showActivity(JSON.parse(xhr.response));
}
xhr.onerror = function() {
console.error("failed fetching activities");
}
xhr.send();
}
refreshLivescore();
window.setInterval(refreshLivescore, 5000);
// recently played
if (window.localforage) {
let listhistory = document.getElementById("beatmap-list-history");
Expand Down
19 changes: 1 addition & 18 deletions local.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>owu! | Favorites</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style/picnic.min.css">
Expand All @@ -17,23 +17,6 @@
<script src="scripts/jsloader.js"></script>
<script src="scripts/lib/localforage.min.js"></script>
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>

<body>
Expand Down
19 changes: 1 addition & 18 deletions new.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>owu! | New Beatmaps</title>
<link rel=”canonical” href=”https://owu.vercel.app/”/>
<meta name="description" content="owu = osu! + web | The unofficial web port of the popular rhythm game osu!">
<meta name="description" content="owu = osu! + web | The unofficial web port of the rhythm game osu!">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style/picnic.min.css">
Expand All @@ -17,23 +17,6 @@
<script src="scripts/jsloader.js"></script>
<script src="scripts/lib/localforage.min.js"></script>
<script async src="https://arc.io/widget.min.js#f6CePGyv"></script>
<script type="application/javascript">
(function (b, o, n, g, s, r, c) {
if (b[s]) return;
b[s] = {};
b[s].scriptToken = "Xy00NzU5OTgyNTg";
b[s].callsQueue = [];
b[s].api = function () {
b[s].callsQueue.push(arguments);
};
r = o.createElement(n);
c = o.getElementsByTagName(n)[0];
r.async = 1;
r.src = g;
r.id = s + n;
c.parentNode.insertBefore(r, c);
})(window, document, "script", "https://cdn.oribi.io/Xy00NzU5OTgyNTg/oribi.js", "ORIBI");
</script>
</head>

<body>
Expand Down
Loading

0 comments on commit 0aecc86

Please sign in to comment.