Skip to content

Commit

Permalink
Add Steam
Browse files Browse the repository at this point in the history
  • Loading branch information
bribes committed Sep 2, 2024
1 parent f02ffa0 commit 3df02a1
Show file tree
Hide file tree
Showing 7 changed files with 406 additions and 17 deletions.
146 changes: 129 additions & 17 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body {
margin-bottom: 4px;
}

.info.minecraft{
.info.minecraft {
padding-top: 12px;
}

Expand All @@ -63,6 +63,18 @@ body {
margin-bottom: 14px;
}

.steam.minecraft {
padding-top: 12px;
}

.info.steam {
padding-top: 15px;
}

.steam img {
margin-bottom: 7px;
}

.options {
background-color: transparent;
border: 1px solid rgba(255, 255, 255, .5);
Expand All @@ -88,7 +100,7 @@ p,
}

a:hover {
opacity: .6;
opacity: .6;
}

h1 {
Expand Down Expand Up @@ -149,11 +161,11 @@ ul {
left: 17.5%;
}

ul > li {
ul>li {
text-indent: -5px;
}

ul > li:before {
ul>li:before {
content: "— ";
text-indent: -5px;
}
Expand Down Expand Up @@ -187,7 +199,7 @@ a[disabled] {
text-decoration: none;
}

.pages a > div {
.pages a>div {
border: 1px solid rgba(255, 255, 255, .5);
border-radius: .5rem;
width: 52px;
Expand All @@ -199,31 +211,35 @@ a[disabled] {
}

@media screen and (max-width: 600px) {
.info, .options {
width: 95vw!important;
padding: 42px!important;
font-size: 20px!important;

.info,
.options {
width: 95vw !important;
padding: 42px !important;
font-size: 20px !important;
}

.info img {
position: absolute!important;
width: 24px!important;
left: 0!important;
top: 0!important;
position: absolute !important;
width: 24px !important;
left: 0 !important;
top: 0 !important;
}

ul {
position: unset!important;
position: unset !important;
}

.github {
display: none!important;
display: none !important;
}
}

@media screen and (max-width: 400px) {
.info, .options {
min-width: unset!important;

.info,
.options {
min-width: unset !important;
}
}

Expand All @@ -240,3 +256,99 @@ a[disabled] {
opacity: 1;
}
}


/* FOR STEAM, FROM totp.codes */
.steamOuter {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}

input {
background-color: transparent;
border: 1px solid rgba(255, 255, 255, .5);
padding: 12px;
border-radius: .8rem;
text-align: center;
font-size: 18px;
font-family: 'Inconsolata';
font-weight: 500;
width: 135%;
color: white;
-webkit-transition: all 200ms linear;
-ms-transition: all 200ms linear;
transition: all 200ms linear;
-webkit-font-smoothing: antialiased;
}

input:focus {
outline: none !important;
border-color: rgba(255, 255, 255, .75);
box-shadow: none;
}

code {
font-family: 'Inconsolata', sans-serif;
font-size: 38px;
font-weight: 500;
display: block;
padding: 7px;
border-radius: 6px;
color: white;
opacity: .15;
margin-top: .5rem;
cursor: pointer;
}

p {
font-size: 18px;
color: rgba(255, 255, 255, .5);
font-weight: 500;
}

.tippy-box canvas {
filter: drop-shadow(0 0 4px #000);
}

.tippy-box[data-theme~=translucent] {
background-color: #262626;
border-radius: 2.65rem;
padding: .8rem
}

.tippy-box[data-theme~=translucent]>.tippy-arrow {
width: 14px;
height: 14px
}

.tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {
border-width: 7px 7px 0;
border-top-color: #262626
}

.tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {
border-width: 0 7px 7px;
border-bottom-color: #262626
}

.tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {
border-width: 7px 0 7px 7px;
border-left-color: #262626
}

.tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {
border-width: 7px 7px 7px 0;
border-right-color: #262626
}

.tippy-box[data-theme~=translucent]>.tippy-backdrop {
background-color: #262626
}

.tippy-box[data-theme~=translucent]>.tippy-svg-arrow {
fill: #262626
}

/* END */
37 changes: 37 additions & 0 deletions guides/steam.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
window.steps = [
{
"points": [
"Sign in to your account [here](https://steamcommunity.com/login/home)",
"Go to [Account](https://store.steampowered.com/account) > Contact info",
"Change email and remove phone number"
]
},
{
"points": [
"Secure the OGE if provided",
"Find the account creation email",
"Ensure the creation dates match"
]
},
{
"points": [
"Change the password [here](https://help.steampowered.com/en/wizard/HelpChangePassword)",
"Make sure your password is secure",
"Click [here](https://bitwarden.com/password-generator) to generate a password"
]
},
{
"points": [
"Go to the [Manage Steam Guard](https://store.steampowered.com/twofactor/manage) page",
"Set up Steam Guard in the [mobile app](https://store.steampowered.com/twofactor/add_authenticator?authenticatortype=steam)",
"Alternatively, set up SDA [here](https://github.com/Jessecar96/SteamDesktopAuthenticator/releases/tag/1.0.13)"
]
},
{
"points": [
"Download/save purchase history [here](https://store.steampowered.com/account/history)",
"Download/save license history [here](https://store.steampowered.com/account/licenses)",
"Find/save your SteamID64 [here](https://securing.guide/steam/id)"
]
}
]
Binary file added icons/steam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ <h3>secure your social media accounts</h3>
<img src="./icons/discord.png" width="32">
</div>
</a>
<a href="./steam">
<div>
<img src="./icons/steam.png" width="32">
</div>
</a>
<a href="./2fa">
<div>
2FA
Expand Down
96 changes: 96 additions & 0 deletions js/steamid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
const vanity = document.getElementById('vanity');
var steamId = "00000000000000000";
var check = 0;

async function updateSteamID() {
try {
check++
var prev = check;
var wow = setTimeout(async () => {
if (prev == check) {
const steamAPI = await fetch("https://cors.faav.top/steam/" + vanity.value)
if (steamAPI.status == 200) {
const steamData = await steamAPI.json();
if (!steamData.error) {
steamId = steamData.id;
document.getElementById('steamid').innerHTML = "1" + String(steamData.id) + "1";
document.getElementById('steamid').style.opacity = '1';
} else {
steamId = "00000000000000000";
document.getElementById('steamid').innerHTML = "1" + "00000000000000000" + "1";
document.getElementById('steamid').style.opacity = '';
}
}
} else {
clearTimeout(wow)
}
}, 250)
} catch {
steamId = "00000000000000000";
document.getElementById('steamid').innerHTML = "1" + "00000000000000000" + "1";
document.getElementById('steamid').style.opacity = '';
}
}

vanity.addEventListener('input', async function () {
if (vanity.value.length == 0 || vanity.value.length > 32 || vanity.value.length < 3) {
steamId = "00000000000000000";
document.getElementById('steamid').innerHTML = "1" + "00000000000000000" + "1";
document.getElementById('steamid').style.opacity = '';
} else {
await updateSteamID();
}
})

function fallbackCopyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.value = text;

textArea.style.top = "0";
textArea.style.left = "0";
textArea.style.position = "fixed";

document.body.appendChild(textArea);
textArea.focus();
textArea.select();

try {
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Fallback: Copying text command was ' + msg);
} catch (err) {
console.error('Fallback: Oops, unable to copy', err);
}

document.body.removeChild(textArea);
}

function copyTextToClipboard(text) {
if (!navigator.clipboard) {
fallbackCopyTextToClipboard(text);
return;
}
navigator.clipboard.writeText(text).then(function () {
console.log('Async: Copying to clipboard was successful!');
}, function (err) {
console.error('Async: Could not copy text: ', err);
});
}

document.getElementById('steamid').addEventListener('click', () => copyTextToClipboard(steamId))

tippy('#steamid', {
content: "Copied!",
trigger: 'click',
animation: 'shift-away',
hideOnClick: false,
theme: 'translucent',
offset: [0, -10],
onShow(instance) {
setTimeout(() => {
instance.hide();
}, 500);
}
});

document.getElementById('steamid').innerHTML = "1" + "00000000000000000" + "1";
Loading

0 comments on commit 3df02a1

Please sign in to comment.