-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coolmath, important, armor fix, forum, about fix
- Loading branch information
1 parent
3a10456
commit a82bc7a
Showing
8 changed files
with
2,257 additions
and
1,959 deletions.
There are no files selected for viewing
36 changes: 0 additions & 36 deletions
36
asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/92books.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
1,630 changes: 1,627 additions & 3 deletions
1,630
asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/atlas.html
Large diffs are not rendered by default.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
asdjklhfskjafhakfhueoyraehfjkcnjkdscnsjakdreuoiwefh/cmg.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.