cloud_variable

What does it do?

This simple service allows you to make any JS variable a "cloud variable"

This allows anyone to create server less websites.

Create chat room, mutliplayer games and anything else with 0 set up!

Set Up

Add it by adding the following tag to your HTML

<script src="https://kihtrak.com/cloud_variable/cloudify.min.js"></script>

You can run it through the console with:

document.head.appendChild((($, s)=>{$.src=s;return $})(document.createElement('script'), "https://kihtrak.com/cloud_variable/cloudify.min.js"))


Usage

To make a cloud variable, simply define a variable in JS with the prefix cloud_

Example:

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

Thats it... it's that easy!

You can now use it like you would use any other variable:

cloud_views++; //the cloud_views variable will be incremented by one on all computers

If for some reason you need to delete a cloud_variable, just set it null

cloud_views = null; //cloud_views will no longer exist in the backend and will be null on all computers

Security

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).

I would not recomment storing sensitive data in a cloud variable. This tool is best suited for things like names, scores, viewcounts, etc.

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.