Skip to content

Commit 0cb3dfb

Browse files
committed
Now it works
1 parent 513ee8a commit 0cb3dfb

File tree

6 files changed

+486
-398
lines changed

6 files changed

+486
-398
lines changed

public/extension/404.html

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!doctype html>
2+
<html>
3+
4+
<head>
5+
<title>404 | webosu!</title>
6+
<link rel=”canonical” href=”https://webosu.online/”/>
7+
<meta name="description" content="The unofficial web port of the rhythm game osu! with a huge pool of beatmaps and a clean, lazer-like UI this is one of the best osu! web ports">
8+
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
9+
<link rel="icon" href="assets/img/favicon.png">
10+
<link rel="stylesheet" href="assets/css/picnic.min.css">
11+
<link rel="stylesheet" type="text/css" href="assets/css/main.css">
12+
<link rel="stylesheet" type="text/css" href="assets/css/font.css">
13+
<script src="assets/js/lib/localforage.min.js"></script>
14+
<script async src="https://arc.io/widget.min.js#jmdVhsH5"></script>
15+
</head>
16+
<body>
17+
<!--Nav Bar-->
18+
<nav id="main-nav">
19+
<div class="nav-link">
20+
<a href="index.html" class="brand">webosu!</a>
21+
<a href="new.html" class="pseudo button">New</a>
22+
<a href="hot.html" class="pseudo button">Popular</a>
23+
<a href="browse.html" class="pseudo button">Browse</a>
24+
</div>
25+
<div class="nav-search">
26+
<form action="search.html">
27+
<container id="searchbar" class="searchbar">
28+
<input type="text" name="search-placeholder" placeholder="Beatmap or SID" />
29+
</container>
30+
</form>
31+
</div>
32+
<div class="nav-tool">
33+
<a href="faq.html" class="pseudo button">FAQ</a>
34+
<a href="local.html" class="pseudo button">Favorites</a>
35+
<a href="settings.html" class="pseudo button">Settings</a>
36+
<a onclick="document.documentElement.requestFullscreen();" class="pseudo button">Fullscreen</a>
37+
</div>
38+
</nav>
39+
<!--Main page-->
40+
<div class="main-page" id="main-page">
41+
<div class="main-content">
42+
<div class="announcement">
43+
Announcement: Check out <a href="https://webosu.online/testing/">webosu!testing</a> to see new features/bug fixes before they come to main!
44+
</div>
45+
<br>
46+
<div class="index-area">
47+
<h2>The page you are looking for doesn't exist. Check the URL for typos or click the webosu! button to go home.</h2>
48+
<!--Footer-->
49+
<footer class="footer">
50+
<div class="text">Join the <a href="https://discord.gg/gHgcR92QMy">Discord server if have any problems!</a></div>
51+
<div class="text">Beatmap API: <a href="https://osu.sayobot.cn/">Sayobot</a></div>
52+
<div class="text">Stable Release: <a href="https://github.com/BlaNKtext/webosu">2.6.1</a></div>
53+
</footer>
54+
</div>
55+
</div>
56+
</body>
57+
<script type="module">
58+
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.0.0/firebase-app.js";
59+
import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.0.0/firebase-analytics.js";
60+
const firebaseConfig = {
61+
apiKey: "AIzaSyBJyrBf03GhNZbupO6uU-wtDTfAC_zY8_0",
62+
authDomain: "webosu.firebaseapp.com",
63+
projectId: "webosu",
64+
storageBucket: "webosu.appspot.com",
65+
messagingSenderId: "138250997417",
66+
appId: "1:138250997417:web:be7407c18de702880763b8",
67+
measurementId: "G-55J58MR5ZW"
68+
};
69+
const app = initializeApp(firebaseConfig);
70+
const analytics = getAnalytics(app);
71+
</script>
72+
</html>

public/extension/assets/js/initgame.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,7 @@ require(["osu", "underscore", "sound", "playback"],
126126
document.getElementById("sound-progress").classList.add("finished");
127127
document.body.classList.add("sound-ready");
128128
};
129-
if (window.gamesettings.soundNames){
130-
sounds.cload(window.gamesettings.soundNames);
131-
}
132-
else {
133-
sounds.load(sample);
134-
}
129+
sounds.load(sample);
135130

136131
PIXI.Sprite.prototype.bringToFront = function() {
137132
if (this.parent) {

public/extension/assets/js/jsloader.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// delayed js loader
2+
13
function loadScript(url, callback, aux) {
24
let script = document.createElement("script");
35
document.head.appendChild(script);
@@ -10,6 +12,9 @@ function loadScript(url, callback, aux) {
1012
}
1113
script.src = url;
1214
}
15+
16+
17+
1318
window.beatmaplistLoadedCallback = function () {
1419
window.setTimeout(function () {
1520
loadScript("assets/js/lib/zip.js", function () {
@@ -41,6 +46,22 @@ window.beatmaplistLoadedCallback = function () {
4146
}, {
4247
"data-main": "assets/js/initgame"
4348
});
49+
// load Liked list
50+
if (window.localforage) {
51+
localforage.getItem("likedsidset", function (err, item) {
52+
if (!err) {
53+
if (item && item.size)
54+
window.liked_sid_set = item;
55+
else
56+
window.liked_sid_set = new Set();
57+
for (let i = 0; i < window.liked_sid_set_callbacks.length; ++i)
58+
window.liked_sid_set_callbacks[i]();
59+
window.liked_sid_set_callbacks = [];
60+
} else {
61+
console.error("Favorites list failed to load");
62+
}
63+
});
64+
}
4465
}
4566
}
4667

public/extension/assets/js/osu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ define(["underscore", "osu-audio", "curves/LinearBezier", "curves/CircumscribedC
319319
img.src = URL.createObjectURL(blob);
320320
});
321321
} else {
322-
img.src = "skin/assets/img/defaultbg.jpg";
322+
img.src = "assets/img/defaultbg.jpg";
323323
}
324324
};
325325

public/extension/assets/js/playback.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,10 @@ define(["osu", "playerActions", "SliderMesh", "overlay/score", "overlay/volume",
454454
loadBackground(uri);
455455
});
456456
} else {
457-
loadBackground("skin/assets/img/defaultbg.jpg");
457+
loadBackground("assets/img/defaultbg.jpg");
458458
}
459459
} else {
460-
loadBackground("skin/assets/img/defaultbg.jpg");
460+
loadBackground("assets/img/defaultbg.jpg");
461461
}
462462
};
463463
self.createBackground();

0 commit comments

Comments
 (0)