test: localStorage test
This commit is contained in:
parent
242a76511c
commit
ef39a4966d
1 changed files with 23 additions and 2 deletions
|
@ -189,10 +189,33 @@
|
|||
<!-- NON-INTERACTIVE DECORATION AREA -->
|
||||
<section id="bottom">
|
||||
<hr>
|
||||
<p id="debug-area"></p>
|
||||
<form>
|
||||
<button id="localtest" type="button" onmouseover="Localtest(0)" onclick="Localtest(0)">TEST</button>
|
||||
<button id="yazdir" type="button" onmouseover="Localtest(1)" onclick="Localtest(1)">Yazdır</button>
|
||||
</form>
|
||||
<div id="DEV" style="font-size: x-small;"></div>
|
||||
<div id="rainbow"></div>
|
||||
</section>
|
||||
|
||||
|
||||
<script>
|
||||
function Localtest(a) {
|
||||
if (a == 0) {
|
||||
var nowdate = new Date;
|
||||
localStorage.setItem("localtest", nowdate);
|
||||
}
|
||||
if (a == 1) {
|
||||
if (localStorage.getItem("localtest") == null) {
|
||||
document.getElementById("debug-area").innerHTML = "ÇALIŞMIYOR :(";
|
||||
}
|
||||
else {
|
||||
document.getElementById("debug-area").innerHTML = localStorage.getItem("localtest");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="./assets/js/utils.js"></script>
|
||||
<script src="./assets/js/updates.js"></script>
|
||||
|
||||
|
@ -201,8 +224,6 @@
|
|||
<script src="./assets/js/initialize.js"></script>
|
||||
|
||||
<script src="./assets/js/timers.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue