Skip to content

Commit

Permalink
coolmath, important, armor fix, forum, about fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-92 authored Sep 18, 2024
1 parent 3a10456 commit a82bc7a
Show file tree
Hide file tree
Showing 8 changed files with 2,257 additions and 1,959 deletions.
36 changes: 0 additions & 36 deletions asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/92books.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ <h1>About thepegleg</h1>
### [Return to the main page](asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/index.html)
</md>
<md id="thingy"></md>
</main>
</main>
<script>
fetch('https://cdn.jsdelivr.net/gh/thepegleg/thepegleg.github.io/README.md')
fetch('README.md')
.then(response => {
if (!response.ok) {
throw new Error("HTTP error " + response.status);
Expand All @@ -133,7 +133,6 @@ <h1>About thepegleg</h1>
document.getElementById("thingy").innerHTML = text;
})
.catch(error => {
// Handle/report error
});
</script>
<script src="https://cdn.jsdelivr.net/gh/MarketingPipeline/Markdown-Tag/markdown-tag-GitHub.js"></script>
<script src="https://cdn.jsdelivr.net/gh/MarketingPipeline/Markdown-Tag/markdown-tag-GitHub.js"></script>
3 changes: 1 addition & 2 deletions asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/ag.html

Large diffs are not rendered by default.

1,630 changes: 1,627 additions & 3 deletions asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/atlas.html

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/cmg.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
body {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
embed {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<script>
// Function to get the <base> href from the HTML content
async function getBaseHref(url) {
try {
const response = await fetch(url);
const html = await response.text();

const parser = new DOMParser();
const doc = parser.parseFromString(html, "text/html");

// Get the <base> tag and return its href if it exists
const baseTag = doc.querySelector("base");
return baseTag ? baseTag.href : url; // Fallback to the original URL if no <base> tag
} catch (error) {
console.error("Error fetching the webpage:", error);
}
}

// Get the 'game' query parameter from the URL
let params = new URLSearchParams(window.location.search);
let name = params.get("game");

if (name) {
// Construct the URL of the game page
const gamePageUrl = 'https://www.coolmathgames.com/0-' + name + '/play';

// Fetch the base href and set it as the embed source
getBaseHref(gamePageUrl).then(baseHref => {
const embed = document.createElement("embed");
embed.frameborder = "0";
embed.src = baseHref;
document.body.appendChild(embed);
});
} else {
console.error("No game name specified in the URL.");
}
</script>
</body>
</html>
Loading

0 comments on commit a82bc7a

Please sign in to comment.