1ab98744e4
- Added level leaderboards - Nonixestent level IDs are now rounded to nearest whole number - Removed horizontal dragscrolling (sorry 101arrowz :P) - Upped search length to 20
192 lines
9 KiB
HTML
192 lines
9 KiB
HTML
<head>
|
|
<title>[[USERNAME]]'s Profile</title>
|
|
<meta charset="utf-8">
|
|
<link href="../css/browser.css" type="text/css" rel="stylesheet">
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-135255146-3"></script><script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-135255146-3');</script>
|
|
<link rel="icon" href="../icon/[[USERNAME]]">
|
|
<meta id="meta-title" property="og:title" content="[[USERNAME]]'s profile">
|
|
<meta id="meta-desc" property="og:description" content="Stars: [[STARS]] | Diamonds: [[DIAMONDS]] | Coins: [[COINS]] | User Coins: [[USERCOINS]] | Demons: [[DEMONS]] | CP: [[CP]]">
|
|
<meta id="meta-image" name="og:image" itemprop="image" content="https://gdbrowser.com/icon/[[USERNAME]]">
|
|
</head>
|
|
|
|
<body class="levelBG" onbeforeunload="saveUrl()">
|
|
|
|
<div id="everything">
|
|
|
|
<div class="popup" id="settingsDiv">
|
|
<div class="fancybox bounce center supercenter">
|
|
<h2 class="smaller center" style="font-size: 5.5vh">User Info</h2>
|
|
<p class="bigger center" id="userInfo" style="line-height: 5vh; margin-top: 1.5vh;">
|
|
Friend Requests: [[REQS]]<br>
|
|
Private Messages: [[DMS]]<br>
|
|
Comment History: [[COMMENTS]]<br>
|
|
</p>
|
|
<img src="../assets/ok.png" width=20%; class="gdButton center" onclick="$('#settingsDiv').hide()">
|
|
</div>
|
|
</div>
|
|
|
|
<div style="position:absolute; bottom: 0%; left: 0%; width: 100%">
|
|
<img class="cornerPiece" src="../assets/corner.png" width=7%;>
|
|
</div>
|
|
|
|
<div style="position:absolute; bottom: 0%; right: 0%; width: 100%; text-align: right;">
|
|
<img class="cornerPiece" src="../assets/corner.png" width=7%; style="transform: scaleX(-1)">
|
|
</div>
|
|
|
|
<div style="position:absolute; top: 2%; left: 1.5%; width: 10%; height: 25%; pointer-events: none">
|
|
<img class="gdButton yesClick" id="backButton" src="../assets/back.png" height="30%" onclick="backButton()">
|
|
</div>
|
|
|
|
<div class="brownBox center supercenter" style="width: 135vh; height: 82%; margin-top: -0.7%">
|
|
|
|
<h1 class="veryBig inline">
|
|
<img class="inline valign" id="modBadge1" style="display: none; height: 7%; margin-right: -6%; cursor:help" src="../assets/mod.png" title="[[USERNAME]] is a moderator!">
|
|
<img class="inline valign" id="modBadge2" style="display: none; height: 7%; margin-right: -6%; cursor:help" src="../assets/mod-elder.png" title="[[USERNAME]] is an elder moderator!">
|
|
[[USERNAME]]
|
|
</h1>
|
|
|
|
<hr style="margin-bottom: 2%">
|
|
<h3 id="collectibles">
|
|
[[STARS]] <img class="valign" src="../assets/star.png" style="cursor: help" title="Stars">
|
|
[[DIAMONDS]] <img class="valign" src="../assets/diamond.png" style="cursor: help" title="Diamonds">
|
|
[[COINS]] <img class="valign" src="../assets/coin.png" style="cursor: help" title="Secret Coins">
|
|
[[USERCOINS]] <img class="valign"src="../assets/silvercoin.png" style="cursor: help" title="User Coins">
|
|
[[DEMONS]] <img class="valign"src="../assets/demon.png" style="cursor: help" title="Demons">
|
|
[[CP]] <img class="valign" src="../assets/cp.png" style="cursor: help" title="Creator Points">
|
|
</h3>
|
|
|
|
<div class="lightBox center" id="iconsDiv" style="margin: 2% auto; width: 105vh">
|
|
<img src="../icon/[[USERNAME]]?form=cube">
|
|
<img src="../icon/[[USERNAME]]?form=ship" style="height: 9%">
|
|
<img src="../icon/[[USERNAME]]?form=ball">
|
|
<img src="../icon/[[USERNAME]]?form=ufo" style="height: 7%">
|
|
<img src="../icon/[[USERNAME]]?form=wave">
|
|
<img src="../icon/[[USERNAME]]?form=robot">
|
|
<img src="../icon/[[USERNAME]]?form=spider">
|
|
</div>
|
|
|
|
<div class="lightBox center dragscroll" id="statusDiv" style="margin: 2% auto; width: 105vh; height: 35vh; background-color: #BE6F3F">
|
|
</div>
|
|
|
|
<div class="center" style="margin: 2.5% auto;">
|
|
<img src="../assets/messages.png" height="10%" id="msgButton" class="sideSpace gdButton" onclick="$('#settingsDiv').show()">
|
|
<img src="../assets/friends.png" height="10%" id="friendButton" class="sideSpace gdButton" onclick="$('#settingsDiv').show()">
|
|
</div>
|
|
|
|
<!-- <img src="../assets/follow-off.png" class="gdButton" style="position: absolute; left: 0.5%; bottom: 1%; width: 6%"> -->
|
|
<a href="../search/[[USERNAME]]?user"><img src="../assets/levels.png" class="gdButton" style="position: absolute; right: 0.5%; bottom: 1%; width: 6%"></a>
|
|
<a id="commentA"><img src="../assets/comments.png" class="gdButton" id="commentButton" style="position: absolute; right: 0.5%; bottom: 50%; width: 6%" onclick="$('#settingsDiv').show()"></a>
|
|
|
|
<div style="position: absolute; right: 0.5%; top: 0%; width: 6%">
|
|
<a id="youtube" style="display: none" target="_blank" href="https://youtube.com/channel/[[YOUTUBE]]"><img src="../assets/youtube.png" class="gdButton socialButton"></a>
|
|
<a id="twitter" style="display: none" target="_blank" href="https://twitter.com/[[TWITTER]]"><img src="../assets/twitter.png" class="gdButton socialButton"></a>
|
|
<a id="twitch" style="display: none" target="_blank" href="https://twitch.tv/[[TWITCH]]"><img src="../assets/twitch.png" class="gdButton socialButton"></a>
|
|
</div>
|
|
|
|
<div id="globalrank0" style="position: absolute; left: 0.3%; top: 1.5%; width: 25%; text-align: left">
|
|
<p style="margin: 0;"><img src="../assets/trophy.png" class="inline valign" width="18%" style="cursor: help" title="Global Rank"> [[RANK]]</p>
|
|
</div>
|
|
|
|
<div class="supercenter" id="pageDown" style="left: 5%; top: 65%; height: 10%; display: none;">
|
|
<img class="gdButton" src="../assets/arrow-left.png" height="95%" onclick="page -= 1; appendComments()">
|
|
</div>
|
|
|
|
<div class="supercenter" id="pageUp" style="left: 95%; top: 65%; height: 10%;">
|
|
<img class="gdButton" src="../assets/arrow-right.png" height="95%" onclick="page += 1; appendComments()">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
<script async type="text/javascript" src="../assets/sizecheck.js"></script>
|
|
<script type="text/javascript" src="../assets/dragscroll.js"></script>
|
|
|
|
<script>
|
|
|
|
$('#collectibles').html($('#collectibles').html().split('0 <img class="valign" src="../assets/cp')[0])
|
|
$('#modBadge[[MODERATOR]]').show()
|
|
$('#globalrank[[RANK]]').hide()
|
|
|
|
if (`[[YOUTUBE]]` != "null") $('#youtube').show()
|
|
if (`[[TWITTER]]` != "null") $('#twitter').show()
|
|
if (`[[TWITCH]]` != "null") $('#twitch').show()
|
|
|
|
let messages = "[[MESSAGES]]"
|
|
let commenthistory = "[[COMMENTHISTORY]]"
|
|
|
|
let reqMode = [[FRIENDREQUESTS]] ? "<span style='color:lime'>Enabled</span>" : "<span style='color:red'>Disabled</span>"
|
|
let dmMode = messages == "all" ? "<span style='color:lime'>Public</span>" : messages == "friends" ? "<span style='color:yellow'>Friends Only</span>" : "<span style='color:red'>Disabled</span>"
|
|
let commentMode = commenthistory == "all" ? "<span style='color:lime'>Public</span>" : commenthistory == "friends" ? "<span style='color:yellow'>Friends Only</span>" : "<span style='color:red'>Disabled</span>"
|
|
|
|
if (commenthistory == "friends") $('#commentButton').attr('src', '../assets/comments-yellow.png')
|
|
else if (commenthistory == "off") $('#commentButton').attr('src', '../assets/comments-grey.png')
|
|
else {
|
|
$('#commentButton').attr('src', '../assets/comments.png').attr('onclick', '')
|
|
$('#commentA').attr('href', '../comments/[[USERNAME]]')
|
|
}
|
|
|
|
if (messages == "friends") $('#msgButton').attr('src', '../assets/messages-yellow.png')
|
|
else if (messages == "off") $('#msgButton').attr('src', '../assets/messages-grey.png')
|
|
|
|
if (![[FRIENDREQUESTS]]) $('#friendButton').attr('src', '../assets/friends-grey.png')
|
|
|
|
$('#userInfo').html($('#userInfo').html()
|
|
.replace("[[REQS]]", reqMode)
|
|
.replace("[[DMS]]", dmMode)
|
|
.replace("[[COMMENTS]]", commentMode))
|
|
|
|
function appendComments() {
|
|
|
|
if (loadingComments) return;
|
|
else loadingComments = true;
|
|
|
|
$('#statusDiv').html(`<div class="supercenter" id="loading" style="height: 12%; top: 62%;"><img class="spin noSelect" src="../assets/loading.png" height="105%"></div>`)
|
|
|
|
if (page == 0) $('#pageDown').hide()
|
|
else $('#pageDown').show()
|
|
|
|
fetch(`../api/comments/[[ACCOUNTID]]?type=profile&page=${page}`).then(res => res.json()).then(res => {
|
|
|
|
if (res.length != 10) $('#pageUp').hide()
|
|
else $('#pageUp').show()
|
|
|
|
if (res == "-1") return $('#loading').hide()
|
|
|
|
res.forEach(x => {
|
|
$('#statusDiv').append(`
|
|
<div class="commentBG">
|
|
<div class="comment">
|
|
<h2>[[USERNAME]]</h2>
|
|
<div class="commentAlign">
|
|
<p class="commentText" style="color: ${"[[USERNAME]]" == "RobTop" ? "rgb(50, 255, 255)" : "[[MODERATOR]]" == "2" ? "rgb(75, 255, 75)" : "white"}">${x.content}</p>
|
|
</div>
|
|
</div>
|
|
<p class="commentDate">${x.date}</p>
|
|
<div class="commentLikes">
|
|
<img id="likeImg" class="inline" ${x.likes < 0 ? "style='transform: translateY(25%)'" : ""} src="../assets/${x.likes < 0 ? "dis" : ""}like.png" height=20% style="margin-right: 0.4%">
|
|
<h3 class="inline">${x.likes}</h3><br>
|
|
</div>
|
|
</div>`)
|
|
})
|
|
|
|
$('.commentText').each(function() {
|
|
if ($(this).text().length > 100) {
|
|
let overflow = ($(this).text().length - 100) * 0.01
|
|
$(this).css('font-size', (3.5 - (overflow)) + 'vh')
|
|
}
|
|
});
|
|
$('#loading').hide()
|
|
})
|
|
loadingComments = false;
|
|
}
|
|
|
|
let page = 0
|
|
let loadingComments = false
|
|
appendComments()
|
|
|
|
|
|
</script>
|
|
|