forked from KihtrakRaknas/cloud_variable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
75 lines (74 loc) · 4.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>cloud_variable</title>
<link href="prism.css" rel="stylesheet" />
<style>
.code{
background-color: black;
padding:5px;
border-radius: 5px;
color:white;
}
.heading{
text-decoration: underline;
}
.container-fluid{
padding-left:30px;
padding-right:30px;
}
pre{
border-radius: 5px;
}
@media (max-width: 575.98px) {
.display-1 {
font-size: 3rem;
font-weight: 300;
line-height: 1.0;
font-weight: bold;
}
}
</style>
</head>
<body>
<div class="container-fluid">
<h1 class="text-center display-1">cloud_variable</h1>
<h3 class="display-4 heading">What does it do?</h3>
<p>This simple service allows you to make any JS variable a "cloud variable"</p>
<p>This allows anyone to create server less websites.</p>
<p>Create chat room, mutliplayer games and anything else with 0 set up!</p>
<h3 class="display-4 heading">Set Up</h3>
<p>Add it by adding the following tag to your HTML</p>
<pre><code class="language-html"><script src="https://kihtrak.com/cloud_variable/cloudify.min.js"></script></code></pre>
<br/>
<p> You can run it through the console with: </p>
<pre><code class="language-js">document.head.appendChild((($, s)=>{$.src=s;return $})(document.createElement('script'), "https://kihtrak.com/cloud_variable/cloudify.min.js"))</code></pre>
<br><br>
<h3 class="display-4 heading">Usage</h3>
<p>To make a cloud variable, simply define a variable in JS with the prefix cloud_</p>
<p>Example:</p>
<pre><code class="language-js">var cloud_views; //Declare a variable anywhere in global scope
//if cloud_views has been set by another computer, cloud_views will automatically have that value</code></pre>
<p>Thats it... it's that easy!</p>
<p>You can now use it like you would use anyother variable:</p>
<pre><code class="language-js">cloud_views++; //the cloud_views variable will be incremented by one on all computers</code></pre>
<h3 class="display-4 heading">Security</h3>
<p>Cloud variables are edited on the front end. This poses unavoidable security concerns. It will be possible to other people to view and change your cloud variables (but only if they find your website).</p>
<p>I would not recomment storing sensitive data in a cloud variable. This tool is best suited for things like names, scores, viewcounts, etc.</p>
<p>Cloud variables are seperated by origin. This means that each domain/subdomain shares all their cloud variables. This enables different subpages on your site to talk to each other.</p>
</div>
<script src="prism.js"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="cloudify.js"></script>
</body>
</html>