Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LoydOsborne committed Mar 19, 2024
1 parent 966df21 commit 0c177a0
Show file tree
Hide file tree
Showing 69 changed files with 5,282 additions and 46 deletions.
4 changes: 2 additions & 2 deletions cast/clever-remarks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: cast
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions cast/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: cast
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions cast/ink-and-ideals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: cast
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions cast/milos-life/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: cast
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions cast/scytedtv-news/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: cast
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions crew/clever-remarks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: crew
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions crew/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: crew
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions crew/ink-and-ideals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: crew
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions crew/milos-life/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: crew
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
4 changes: 2 additions & 2 deletions crew/scytedtv-news/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type: crew
<!-- <link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/mobile-lock.css"> -->
<body>

<!-- <div class="mobile-error">
<!-- <!-- <div class="mobile-error">
<div id="error-message" style="color: red;">
ScytedTV Resources isn't currently available to mobile users at this time.
</div>
</div> -->
</div> --> -->

<style>

Expand Down
130 changes: 130 additions & 0 deletions m/resources/audacity/index-script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
const currentURL = window.location.href;

function redirectToDiscord() {
const baseURL = window.location.origin; // Extract base URL
const AuthUrl = `${baseURL}/oauth/discord/?callbackUrl=${encodeURIComponent(currentURL)}`;
window.location.href = AuthUrl;
}

document.addEventListener("DOMContentLoaded", function () {
const storedAccessToken = getCookie("accessToken");
displayContents();
// Redirect to login if access token is not found
if (!storedAccessToken) {
// window.location.href = `https://auth.scyted.tv/www.scyted.tv/discord?redirectUri=${currentURL}`;
displayLoginButton();
} else {
// Fetch user data from Discord API
fetchDiscordUserData(storedAccessToken)
.then(userData => {
// Display bot info and user info on the dashboard

displayUserInfo(userData);

const loggedInUserId = userData.id;

// Fetch the list of user IDs from the JSON file
// fetch('https://api.scyted.tv/wave-development/dashboard/access/scytedtv-user-access.json')
fetch('https://api.scyted.tv/website/dashboard/access/dashboard-access.json')
.then(response => response.json())
.then(userIds => {
// Check if the logged-in user's ID is in the list
if (!userIds.includes(loggedInUserId)) {
// Clear cookies
// document.cookie = "accessToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
// Redirect to the specified page if the user's ID is not in the
// window.location.href = `https://auth.scyted.tv/www.scyted.tv/discord?error=invalidAccess`;
displayContents();
displayUserInfo(userData);
}
})
.catch(error => {
console.error("Error fetching user IDs:", error);
// Handle error
});
})
.catch(error => {
console.error("Error fetching user data:", error);
// Clear cookies
// document.cookie = "accessToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
// Handle error (e.g., redirect to login page)
// window.location.href = `https://auth.scyted.tv/www.scyted.tv/discord?error=fetchingUserData`;
});
}
});

const urlParams = new URLSearchParams(window.location.hash.substring(1));
const accessToken = urlParams.get("access_token");

if (accessToken) {
try {
// Check if the access token is valid (add your validation logic here)
if (isValidAccessToken(accessToken)) {
// Store the access token in a cookie
setCookie("accessToken", accessToken, 30); // Set cookie to expire in 30 days
// Redirect to the dashboard
window.location.href = "./";
} else {
// Clear the accessToken cookie
clearCookie("accessToken");
}
} catch (error) {
console.error("Error setting accessToken:", error);
}
}

function isValidAccessToken(token) {
// Add your validation logic here
// Return true if the token is valid, otherwise return false
return true; // Placeholder, replace with actual validation
}

function setCookie(name, value, days) {
const date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
const expires = "expires=" + date.toUTCString();
document.cookie = name + "=" + value + ";" + expires + ";path=/";
}

function clearCookie(name) {
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
}

function fetchDiscordUserData(accessToken) {
const apiUrl = 'https://discord.com/api/users/@me';

return fetch(apiUrl, {
headers: {
Authorization: `Bearer ${accessToken}`,
},
})
.then(response => {
if (!response.ok) {
throw new Error(`Discord API Request Failed! Status: ${response.status}`);
}
return response.json();
});
}

function logout() {
// Clear cookies
document.cookie = "accessToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";

// Redirect to login page
window.location.href = `${currentURL}`;
}

function backButton() {
window.location.href = `../`;
}

function getCookie(name) {
const cookies = document.cookie.split("; ");
for (let i = 0; i < cookies.length; i++) {
const cookie = cookies[i].split("=");
if (cookie[0] === name) {
return cookie[1];
}
}
return null;
}
80 changes: 80 additions & 0 deletions m/resources/audacity/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Resource Directory
layout: page
type: resources
---
<style>
hr.has-background-black {
display: none;
}

h1.title {
display: none;
}
</style>
<link rel="stylesheet" href="https://api.scyted.tv/wave-development/dashboard/scytedtv-resources-mobile.css">
<body>

<div class="banner">
<img src="https://cdn.scyted.tv/website-assets/resource-portal/banner.jpg" alt="Banner Image" class="banner-image">
</div>

<div class="resource-container">

<div class="resource-wrapper">

<div class="resource-back" onclick="backButton()"><p>← back</p></div>

<div class="resource-info-box">
<img src="https://cdn.scyted.tv/website-assets/resource-portal/logos/audacity.jpg" alt="Resource Image" class="resource-image">
<h3>Clean Audio</h3>
These are some good settings to help clean up microphone audio in Audacity.<br>
<br>
<em>Source: <a href="https://www.reddit.com/r/letsplay/comments/40gzmh/comment/cyu2dwc" class="url">reddit.com</a></em>
</div>

</div>

<div class="resource-box">

<div id="login-container" class="login-container">
</div>

<style>
.user-info-box {
flex: 1;
padding: 20px;
background-color: #fff;
border-radius: 8px;
margin-top: 10px;
text-align: left;
}
</style>
<div class="container">

<div class="user-info-box" id="userInfoBox">

<h3>STEP 1: Remove Background Noise</h3>

To remove background noise, apply the "Noise Reduction" effect to your audio by first getting a noise profile of the background noise. Select a period of time in your audio clip that consists of just background noise, then click the "Get Noise Profile" button in the Noise Reduction effect.

<br><br>

Now that you've done that, set "Noise reduction (dB)" to 10, "Sensativity" to 2.00, and "Frequency smoothing (bands)" to 4. Make sure you have it set to "Reduce" and not "Residue", then click apply.

<br><br>

<img src="https://cdn.scyted.tv/website-assets/resource-portal/images/audacity/step1.png" alt="Step 1: Remove Background Noise" width="50%" height="auto">

</div>
</div>
</div>
</div>

<script src="https://api.scyted.tv/wave-development/dashboard/page-loading-script.js"></script>
<script src="index-script.js"></script>
<script src="insert-scripts.js"></script>
<script src="https://api.scyted.tv/wave-development/dashboard/mobile-redirect.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LF3ZTHGQHE"></script>

</body>
Loading

0 comments on commit 0c177a0

Please sign in to comment.