Post by Kaitlyn on Oct 9, 2017 1:27:16 GMT
Got bored. Made a thing. If you want to try it out then you can use www.liveweave.com/ and past the style in the CSS tab, the script in the JavaScript tab and the HTML in the HTML tab or whatever you prefer it's not for like a website just got bored so enjoy .
<html>
<style>
.clicky {
background: black;
border: 2px solid blue;
font-weight: bold;
color: white;
font-size: 30;
width: 80%;
height: 80%;
margin: 20;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
padding: 5;
}
.clicky:hover {
transform: scale(1.1);
background: blue;
border: 2px solid black;
cursor: pointer;
}
.clicky:active {
transform: translateY(5px);
}
.reset {
background: black;
border: 2px solid blue;
font-weight: bold;
color: white;
font-size: 20;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
padding: 5;
}
.reset:hover {
transform: scale(1.1);
background: blue;
border: 2px solid black;
cursor: pointer;
}
.reset:active {
transform: translateY(5px);
}
.cuscount {
background: black;
border: 2px solid blue;
font-weight: bold;
color: white;
font-size: 20;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
padding: 5;
}
.cuss {
background: black;
color: white;
border: 2px solid blue;
margin: 0 240 5;
font-weight: bold;
}
.expl {
background: black;
color: white;
border: 2px solid blue;
text-align: center;
font-weight: normal;
}
</style>
<script>
var x = document.getElementById("click").value;
document.getElementById("click").value = localStorage.clickcount;
function count() {
if (typeof(Storage) !== "undefined") {
if (localStorage.clickcount) {
localStorage.clickcount = Number(localStorage.clickcount)+1;
}
else {
localStorage.clickcount = 1;
}
}
document.getElementById("error").innerHTML = "";
document.getElementById("customcount").value = "";
document.getElementById("symerror").innerHTML = "";
document.getElementById("click").value = localStorage.clickcount;
if (localStorage.clickcount < 0) {
localStorage.clickcount = 1;
}
}
document.getElementById("click").draggable = false;
function reset() {
localStorage.clickcount = 1;
document.getElementById("click").value = localStorage.clickcount;
}
function customCount() {
var x = document.getElementById("customcount").value;
if (x > 100000) {
document.getElementById("error").innerHTML = "Only less than 100,000";
return false;
}
localStorage.clickcount = x;
document.getElementById("click").value = localStorage.clickcount;
}
function thousand() {
var y = document.getElementById("symbols").value;
var a = localStorage.clickcount = Number(localStorage.clickcount);
if (y == "+") {
localStorage.clickcount = Number(localStorage.clickcount)+1000;
document.getElementById("clicky").value = localStorage.clickcount;
}
else if (y == "/") {
localStorage.clickcount = Number(localStorage.clickcount)/1000;
document.getElementById("clicky").value = localStorage.clickcount;
}
else if (y == "-") {
localStorage.clickcount = Number(localStorage.clickcount)-1000;
document.getElementById("clicky").value = localStorage.clickcount;
}
else if (y == "*") {
localStorage.clickcount = Number(localStorage.clickcount)*1000;
document.getElementById("clicky").value = localStorage.clickcount;
}
else {
document.getElementById("symerror").innerHTML = "Add a symbol";
}
document.getElementById("click").value = localStorage.clickcount;
}
</script>
<title></title>
<head></head>
<body>
<center>
<button id="reset" onclick="reset()" class="reset">Reset Count</button>
<input type="text" id="click" class="clicky" onclick="count()" readonly>
<p class="cuss">Custom Count:</p>
<input type="number" id="customcount" class="cuscount" max="100000" placeholder="1-100,000" maxlength="6">
<p id="error"></p>
<button class="reset" id="cuscountbut" onclick="customCount()">Make Custom Count</button>
</center>
<br>
<p class="expl">So, a little explaination about what is below. Inside of the text box you can put either, "+", "-", "/", or "*". All of these are your choice, and you can only pick one. What it does is, whatever you choose it will do that with the number 1,000. For example, if you put, "+" into the box it will add 1,000 to your clickcount and viseversa etc.</p>
<br>
<center>
<input class="cuscount" id="symbols" maxlength="1" type="text" placeholder="+ - * /">
<p id="symerror"></p>
<button id="symmake" onclick="thousand()" class="reset">Do Function</button>
</html>