1
0
mirror of synced 2024-12-23 19:34:49 +01:00
bemaniutils/bemani/frontend/static/link.js
Jennifer Taylor 9feae49667 Massive overhaul to Jubeat frontend, including the following:
- Clan jubility breakdown
 - Displaying music rate and stats identically across all score pages
 - Ability to choose what jubility (legacy or new) to display and sort on all players.
 - Various tweaks and small quality of life improvements.
2022-10-08 01:32:59 +00:00

20 lines
631 B
JavaScript

var Link = {
// Helper for taking server-rendered links with a component that we want
// to change client-side, and updating them based on parameters.
get: function(name, param, anchor) {
var uri = window.uris[name];
if (!param || !uri) {
if (!anchor) {
return uri;
} else {
return uri + '#' + anchor.toString();
}
} else if (!anchor) {
return uri.replace("/-1", "/" + param.toString());
} else {
return uri.replace("/-1", "/" + param.toString()) + '#' + anchor.toString();
}
},
};