Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT CREATE PULL REQUESTS HERE #70

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="https://gitlab.com/lukasexists/redstone-nw.netlify.app/-/tree/main/clockwork-app">SOURCE</a> - <a href="https://clockwork-os.vercel.app/">WEBSITE</a> - <a href="https://discord.gg/Sb8NzVbqX8">DISCORD</a><br>
</h4>

<!-- ABOUT SECTION -->
<!-- ABOUT SECTION -->
<p align="center">
<img src="https://black_hole-3kf-1-v0606342.deta.app/api/photo/kfsbywrgp46y.png" align="center">
</p>
Expand Down
1 change: 1 addition & 0 deletions ads.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google.com, pub-1482194878074817, DIRECT, f08c47fec0942fa0
47 changes: 0 additions & 47 deletions assets/scripts/main.js

This file was deleted.

45 changes: 0 additions & 45 deletions guidelines/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion assets/apps/copper.json → public/assets/apps/copper.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"encodedUrl": "no",
"icon": "https://www.metalsdepot.com/assets/files/Catalog_Photos/copper-round-bar.webp",
"version": "1.0.0",
"author": "LukasExists",
"author": "Redstone-Network",
"permissions": []
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"encodedUrl": "yes",
"icon": "https://redstonenw.vercel.app/assets/clockwork/muenster.png",
"version": "v2.0.0",
"author": "LukasExists",
"author": "Redstone-Network",
"permissions": ["installApp"]
}
2 changes: 1 addition & 1 deletion assets/apps/rammer.json → public/assets/apps/rammer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"encodedUrl": "yes",
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTWydnTN7LkHkCONWHU_k6W6Fx7Yj4ByRIubvxZZnXDoA&s",
"version": "1.0.0",
"author": "LukasExists",
"author": "Redstone-Network",
"permissions": []
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
83 changes: 83 additions & 0 deletions public/assets/scripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* Used across the Clockwork main pages */

document.querySelector(".navbar").innerHTML = `<a href="/">Home</a> |
<a href="/legal#gl">Store Guidelines</a> |
<a href="/legal#tos">Terms of Use</a> |
<a href="/legal#privacy">Privacy Policy</a> |
<a href="https://discord.gg/Sb8NzVbqX8">Discord</a> |
<a href="/converter">Convert v1 apps to v2</a> |
<a href="mailto:[email protected]">Contact Support</a> |
© 2023 <a href="https://redstone-network.vercel.app/">Redstone Network</a>`


// for /converter/
function generateV2Code() {
var v1c = document.querySelector("textarea").value;

var appName = v1c.match(/title {0,1}= {0,1}"([^"]+)"/);
if (appName) appName = appName[1];

var appLink = v1c.match(/link {0,1}= {0,1}"([^"]+)"/);
if (appLink) appLink = appLink[1];

if (!appName || !appLink) {
alert("Invalid app!");
throw "InvalidApp";
}

var v2c = `{
"name": "${appName}",
"desc": "Converted from v1 to v2",
"url": "${appLink}",
"encodedUrl": "no",
"icon": "https://redstone-nw.netlify.app/assets/icon.png",
"author": "Type your name here",
"permissions": []
}`;

document.querySelector("textarea").value = v2c;
document.querySelector("#instruction").innerHTML = "Now, you can copy the contents of the textarea into a .JSON file and save it somewhere. Make sure the service you use serves the correct Content-Type headers for .JSON files, such as Github Pages or Vercel.";
}

// for /get-started/
if (document.location.pathname.startsWith("/get-started")) {
const url = "https://"+document.location.hostname+"/os/"
const htmlPage = `
<!DOCTYPE html>
<html>
<body>
<iframe src="about:blank" id="${btoa(url)}"></iframe>
<style>
* {
margin: 0;
padding: 0;
overflow-y: hidden;
}
iframe {
width: 100%;
height: 100vh;
border: none;
}
</style>
<script>
document.querySelector("iframe").src = atob(
document.querySelector("iframe").id
);
</script>
</body>
</html>`.replace(/\n/g,"").replace(/ /g,"");

const aboutBlanker = `javascript:
var win = window.open("","_blank","popup=yes");
win.location.origin = 'https://google.com';
win.document.write(\`<!DOCTYPE html>
<html>
<body>
<iframe src="\${atob('${btoa(url)}')}"></iframe>
<style>* {margin: 0;padding: 0;overflow-y: hidden;}iframe {width: 100%;height: 100vh;border: none;}</style>
</body>
</html>\`);`
document.querySelector("#blanker").href = aboutBlanker;
document.querySelector("#file").href = "data:text/html,"+htmlPage;
document.querySelector("#file2").href = "data:text/html,"+htmlPage;
}
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions assets/styles/main.css → public/assets/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,23 @@ summary::marker {
padding: 0;
text-align: center;
font-family: "Varela Round", Arial, sans-serif;
}
textarea {
background-color: #111;
color: white;
border: 1px solid #222;
width: 100%;
height: 400px;
outline: none;
font-family: 'Courier New', Courier, monospace;
}

input {
background-color: #111;
color: white;
border: 1px solid #222;
border-radius: 0;
outline: none;
font-size: 16px;
font-family: "Roboto Flex", "Roboto", Arial, sans-serif;
}
File renamed without changes.
16 changes: 14 additions & 2 deletions converter/index.html → public/converter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="stylesheet" href="/assets/styles/main.css">
<link rel="icon" href="/assets/images/icon.png">

<meta property="og:title" content="Clockwork - Get Started">
<meta property="og:title" content="Clockwork - Converter">
<meta property="og:type" content="website">
<meta property="og:description" content="Welcome to Clockwork - the ultimate operating system in your browser! Clockwork is specifically designed to help you navigate past filters imposed by schools, unlocking a world of endless possibilities.">
<meta property="og:url" content="https://clockwork-os.vercel.app/">
Expand All @@ -20,7 +20,19 @@
<div class="content">
<h1>Convert v1 apps to v2</h1>
<p>
This tool will help you easily convert your v1 apps to v2 apps!
This tool will help you easily convert your v1 apps to v2 apps. The big change between v1 apps and v2 apps is that v2 apps use .JSON files, rather than .JS files, which helps with security. You'll still be able to add JavaScript using the plugins system.
</p>
<p>
v2 apps also don't require the URL to the file, nor do they require a unique ID. All they need is the name, the url to embed into Clockwork, and a yes or no as to whether the url's encrypted.
</p>
<p id="instruction">
Paste the contents of the .JS file in the text area below, then click the Go button.
</p>
<p>
<textarea placeholder="Paste the contents of the .JS file here."></textarea>
</p>
<p>
<input type="button" value="Go!" onclick="generateV2Code()">
</p>
</div>
<div class="navbar">
Expand Down
File renamed without changes.
File renamed without changes.
57 changes: 57 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>

<head>
<title>Clockwork - the ultimate operating system in your browser</title>

<link rel="preload" href="/assets/images/banner.webp">
<link rel="preload" href="/assets/styles/main.css">
<link rel="stylesheet" href="/assets/styles/main.css">
<link rel="stylesheet" href="https://xylo.42.ar/assets/styles/forxylo.css">
<link rel="icon" href="/assets/images/icon.png">

<meta property="og:title" content="Clockwork">
<meta property="og:type" content="website">
<meta property="og:description" content="Welcome to Clockwork - the ultimate operating system in your browser! Clockwork is specifically designed to help you navigate past filters imposed by schools, unlocking a world of endless possibilities.">
<meta property="og:url" content="https://clockwork-os.vercel.app/">
<meta property="og:image" content="/assets/images/ogbanner.png">
</head>

<body>
<div class="home-banner">
<span>Operating system in your browser</span>
</div>
<div class="content">
<p>
Welcome to Clockwork - the ultimate operating system in your browser! Clockwork is specifically designed to help you navigate past filters imposed by schools, unlocking a world of endless possibilities.
</p>
<p>
With its cutting-edge technology, Clockwork serves as a powerful tool for students seeking unrestricted access to the web. Say goodbye to limitations and hello to boundless exploration.
</p>
<div class="withimgright">
<div>
Clockwork's modular app system provides you with a customizable experience, allowing you to tailor your virtual playground to fit your unique needs. Seamlessly integrate the apps and games you love and create a personalized digital environment that helps you bypass school restrictions.
</div>
<img src="/assets/images/apps.png">
</div>
<div class="withimgleft">
<img src="/assets/images/appstore.png">
<div>
Discover a world of endless possibilities through Clockwork's public App Store, where you can access a vast array of applications made by people all around the US. Whether you want to play games, watch Youtube, or bypass your school's filters, Clockwork's App Store has you covered.
</div>
</div>
<p>
Clockwork is the perfect companion for students who seek to maximize their online experience. Unleash your potential, break through restrictions, and embark on a new era of digital freedom with Clockwork - the tool that opens doors when others close them.
</p>
<iframe src="https://xylo.42.ar/type/banner?blockedkeywords=clockwork" class="a xy bnr d lo"></iframe>
<p class="letsgo">
<a href="/get-started">Want to try it out?</a>
</p>
</div>
<div class="navbar">
Something broke...
</div>
<script src="/assets/scripts/main.js"></script>
</body>

</html>
Loading