forked from gamer2810/steam-miniprofile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (95 loc) · 4.31 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<meta name="referrer" content="no-referrer">
<head>
<link async rel="preload" as="style"
href="https://community.cloudflare.steamstatic.com/public/shared/css/shared_global.css"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="https://community.cloudflare.steamstatic.com/public/shared/css/shared_global.css">
</noscript>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer async>
$(function () {
let searchParams = new URLSearchParams(window.location.search);
let corsHost = "https://steam-miniprofile-cors.glitch.me/"
let steamId = searchParams.get('accountId') ? searchParams.get('accountId') : '76561198055079301';
let interactive = searchParams.get('interactive') ? searchParams.get('interactive') : false;
let vanityId = searchParams.get('vanityId') ? searchParams.get('vanityId') : 'intheheaven';
// For list of available languages, check out README on https://github.com/gamer2810/steam-miniprofile
let language = searchParams.get('lang') ? searchParams.get('lang') : 'koreana';
let corsURL = `${corsHost}https%3A%2F%2Fsteamcommunity.com%2Fminiprofile%2F${steamId}?l=${language}`;
let steamURL = `https://steamcommunity.com/id/${vanityId}`;
if(steamId === '76561198055079301') {
steamId = '76561198055079301';
}
$.get(corsURL, function (data) {
$("#includedContent").html(data).hide();
if ($("#includedContent").children().text().length != 0) {
$(".default").fadeOut("fast", function () {
$(".default").replaceWith(data);
$(".default").fadeIn("fast");
});
window.parent.postMessage(
{
state:"loaded"
}, {
targetOrigin: '*',
})
}
if(interactive && vanityId) {
document.body.style.cursor = "pointer";
$(document).on('click', 'div.miniprofile_container', function(e){
e.preventDefault();
var url = $(this).attr('href');
window.open(steamURL, '_blank');
});
}
});
});
</script>
</head>
<body style="height: fit-content; width: fit-content;">
<div id="includedContent"></div>
<!-- default miniprofile while waiting for the real one to load -->
<!-- cache to help with load time -->
<div class="miniprofile_container default">
<!-- Background -->
<div class="miniprofile_background">
<img class="miniprofile_backgroundblur"
src="https://avatars.akamai.steamstatic.com/fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb.jpg">
</div>
<div class="miniprofile_playersection ">
<!-- Player avatar/name stuff -->
<div class="playersection_avatar border_color_offline">
<img src="https://avatars.fastly.steamstatic.com/cb56471b6bbb734d48054000ceaba827e2776cf3_medium.jpg"
srcset="https://avatars.fastly.steamstatic.com/cb56471b6bbb734d48054000ceaba827e2776cf3_medium.jpg 1x, https://avatars.fastly.steamstatic.com/cb56471b6bbb734d48054000ceaba827e2776cf3_full.jpg 2x">
</div>
<div class="player_content">
<span class="persona offline">Loading</span>
<span class="friend_status_offline">Offline</span>
</div>
</div>
<div class="miniprofile_detailssection not_in_game miniprofile_backdrop">
<div class="miniprofile_featuredcontainer">
<img
src="https://cdn.fastly.steamstatic.com/steamcommunity/public/images/items/3027110/a7f29dbd93b79aaf53d3b43faa95fb0d07aa3277.png"
class="badge_icon">
<div class="description">
<div class="name">Unknown</div>
<div class="xp">? XP</div>
</div>
</div>
<div class="miniprofile_featuredcontainer">
<div class="friendPlayerLevel lvl_0"><span class="friendPlayerLevelNum">?</span></div>
<div class="description">
<div class="name">Steam Level</div>
</div>
</div>
</div>
</div>
</body>
</html>