Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
18bfda8c
Commit
18bfda8c
authored
4 years ago
by
Kayz
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
02c7c379
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!94
Add door stats web page for xtrnmenu
Pipeline
#1275
passed
4 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/xtrnmenu/099-xtrnmenu-gamestats.xjs
+54
-0
54 additions, 0 deletions
xtrn/xtrnmenu/099-xtrnmenu-gamestats.xjs
with
54 additions
and
0 deletions
xtrn/xtrnmenu/099-xtrnmenu-gamestats.xjs
0 → 100644
+
54
−
0
View file @
18bfda8c
<!--Game Stats-->
<div class="list-group">
<h1>Game Stats</h1>
<?xjs
load('sbbsdefs.js');
load("xtrnmenulib.js");
var ExternalMenus = new ExternalMenus();
if (typeof settings.xtrn_blacklist === 'string') {
settings.xtrn_blacklist = settings.xtrn_blacklist.toLowerCase().split(',');
} else {
settings.xtrn_blacklist = [];
}
// Edit these lines as needed to adjust the page
gameStats("recentall", "Most Recent", 10);
gameStats("mostlaunchedall", "Top 15 Most Launched", 15);
gameStats("longestrunall", "Top 15 Longest Run", 15);
function gameStats(menutype, title, maxitems) {
var menuobj = ExternalMenus.getSpecial(menutype, title);
?>
<div class="row list-group-item" style="background-color: #993399; color: #FFF">
<div class="col-sm-12"><h3><?xjs write(title) ?></h3></div>
</div>
<?xjs
if ((typeof menuobj.items !== "undefined") || (menuobj.items.length > 0)) {
var i = 0;
menuobj.items.some(function (menuitem) {
if (menuitem.type != "xtrnprog") {
return;
}
if (settings.xtrn_blacklist.indexOf(menuitem.target.toLowerCase()) > -1) return;
if (++i > maxitems) return;
?>
<div class="row list-group-item striped">
<div class="col-sm-2"><span class="badge badge-inverse"><?xjs write(menuitem.stats) ?></span></div>
<div class="col-sm-10"><?xjs write(menuitem.title) ?></div>
</div>
<?xjs
});
}
}
?>
</div>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment