-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated Demo page - Removed id="cloakSelect" - Added data-cloak-select - Cleaned up code
- Loading branch information
1 parent
f4ee98f
commit f95646a
Showing
17 changed files
with
219 additions
and
92 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,44 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" data-theme="dim"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" type="image/x-icon" href="cloaks/favicon.ico" /> | ||
<title>My cool games site</title> | ||
<script src="../src/index.js"></script> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/daisyui@4.12.13/dist/full.min.css" | ||
rel="stylesheet" | ||
type="text/css" | ||
/> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
<body class="min-h-screen bg-base-200"> | ||
<div class="container mx-auto px-4 py-8"> | ||
<main class="card bg-base-100 shadow-xl p-6"> | ||
<div class="flex items-center mb-4"> | ||
<img | ||
id="favicon" | ||
src="" | ||
alt="Favicon" | ||
class="w-8 h-8 mr-2" | ||
id="cloakImage" | ||
/> | ||
<h1 class="text-2xl font-bold">Default Cloak</h1> | ||
</div> | ||
<p id="cloakText" class="text-lg mb-4">The cloak is set to:</p> | ||
<div class="flex flex-col space-y-4"> | ||
<a href="other.html" class="btn btn-primary">Go to settings page</a> | ||
<a href="showcase.html" class="btn btn-primary">Showcase</a> | ||
<p class="text-sm text-base-content/70"> | ||
Go to the other page to change cloak (simulated settings page) | ||
</p> | ||
</div> | ||
</main> | ||
<footer class="block mt-4 p-4 bg-base-300 rounded-lg footer"> | ||
© 2024 Parcoil Network. All rights reserved. | ||
</footer> | ||
</div> | ||
<script src="main.js"></script> | ||
</body> | ||
</html> |
File renamed without changes.
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,29 @@ | ||
const cloakText = document.getElementById("cloakText"); | ||
|
||
const favicon = cloak.getFavicon(); | ||
|
||
function updateCloakInfo() { | ||
const title = cloak.getTitle(); | ||
const icon = cloak.getFavicon(); | ||
|
||
const faviconImage = document.getElementById("favicon"); | ||
if (faviconImage) { | ||
faviconImage.src = icon; | ||
} | ||
|
||
if (cloakText) { | ||
cloakText.textContent = `The cloak is set to: ${title}`; | ||
} | ||
|
||
document.querySelector("h1").textContent = title; | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", () => { | ||
updateCloakInfo(); | ||
}); | ||
|
||
window.addEventListener("storage", (event) => { | ||
if (event.key === "cloakTitle" || event.key === "cloakFavicon") { | ||
updateCloakInfo(); | ||
} | ||
}); |
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" data-theme="dim"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Cloak Settings</title> | ||
<link rel="icon" type="image/x-icon" href="cloaks/favicon.ico" /> | ||
<link rel="stylesheet" href="./main.css" /> | ||
<script src="../src/index.js"></script> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/daisyui@4.12.13/dist/full.min.css" | ||
rel="stylesheet" | ||
type="text/css" | ||
/> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
<body class="min-h-screen bg-base-200"> | ||
<div class="container mx-auto px-4 py-8"> | ||
<main class="card bg-base-100 shadow-xl p-6"> | ||
<h1 class="text-2xl font-bold mb-4">Cloak Settings</h1> | ||
<a href="index.html" class="btn btn-primary mb-4">Go home</a> | ||
<div class="form-control"> | ||
<label for="cloakSelect" class="label"> | ||
<span class="label-text">Select a Cloak:</span> | ||
</label> | ||
<select | ||
name="cloak" | ||
data-cloak-select | ||
class="select select-bordered w-full max-w-xs" | ||
> | ||
<option value="default">Default Cloak</option> | ||
<option value="poop">Poop Cloak</option> | ||
<option value="purple">Purple Cloak</option> | ||
<option value="sparkles">Sparkle Cloak</option> | ||
</select> | ||
</div> | ||
</main> | ||
<footer class="block mt-4 p-4 bg-base-300 rounded-lg footer"> | ||
© 2024 Parcoil Network. All rights reserved. | ||
</footer> | ||
</div> | ||
</body> | ||
<script> | ||
const cloaks = [ | ||
{ name: "default", icon: "./cloaks/default.ico", title: "Default Cloak" }, | ||
{ name: "poop", icon: "./cloaks/poop.ico", title: "Poop Cloak" }, | ||
{ name: "purple", icon: "./cloaks/purple.ico", title: "Purple Cloak" }, | ||
{ | ||
name: "sparkles", | ||
icon: "./cloaks/sparkles.ico", | ||
title: "Sparkle Cloak", | ||
}, | ||
]; | ||
|
||
document.addEventListener("DOMContentLoaded", () => { | ||
const cloakSelect = document.getElementById("cloakSelect"); | ||
const currentTitle = localStorage.getItem("cloakTitle"); | ||
const currentCloak = cloaks.find((cloak) => cloak.title === currentTitle); | ||
|
||
if (currentCloak) { | ||
cloakSelect.value = currentCloak.name; | ||
} | ||
}); | ||
</script> | ||
</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,58 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" data-theme="dim"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" type="image/x-icon" href="cloaks/favicon.ico" /> | ||
<title>CloakJS Showcase</title> | ||
<script src="../src/index.js"></script> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/daisyui@4.12.13/dist/full.min.css" | ||
rel="stylesheet" | ||
type="text/css" | ||
/> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
</head> | ||
<body class="min-h-screen bg-base-200"> | ||
<div class="container mx-auto px-4 py-8"> | ||
<main class="card bg-base-100 shadow-xl p-6"> | ||
<h1 class="text-3xl font-bold mb-6">CloakJS Showcase</h1> | ||
<p class="text-lg mb-8"> | ||
Discover websites using CloakJS for enhanced privacy and | ||
customization: | ||
</p> | ||
|
||
<div | ||
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 justify-center items-center" | ||
> | ||
<!-- Example Site 1 --> | ||
<div | ||
class="card bg-base-200 shadow-xl transition-all active:scale-[.99] hover:scale-[1.01]" | ||
> | ||
<figure> | ||
<img src="sites/lunaar.png" alt="lunaar image" /> | ||
</figure> | ||
<div class="card-body"> | ||
<h2 class="card-title">Lunaar.org</h2> | ||
<p>A Unblocked games site made by Parcoil.</p> | ||
<div class="card-actions justify-end mt-4"> | ||
<a href="https://lunaar.org" class="btn btn-primary" | ||
>Visit Site</a | ||
> | ||
</div> | ||
</div> | ||
</div> | ||
<p>Add yours by making a pull request!</p> | ||
</div> | ||
|
||
<div class="mt-8"> | ||
<a href="index.html" class="btn btn-secondary">Back to Home</a> | ||
</div> | ||
</main> | ||
<footer class="block mt-4 p-4 bg-base-300 rounded-lg footer"> | ||
© 2024 Parcoil Network. All rights reserved. | ||
</footer> | ||
</div> | ||
<script src="main.js"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.