SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "tela.html")
31 STORE("descrHdr", "AS's Playground")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "AS's Playground")
34 STORE("docType", "TELA-HTML-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "2a499cfc96037bffa943f97d42df3a64c242b1a8c575c806feebeb727f9467e1")
37 STORE("fileCheckS", "2d685a6c6f9760cb7215e919e80b8b7f891e29cc4e267dd8348b11a8b553a9f")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
<!DOCTYPE html>
<html lang="en">
<head>
<title>AS's Playground Live</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="header.js" type="text/javascript" defer></script>
<script src="nav.js" type="text/javascript" defer></script>
<script src="footer.js" type="text/javascript" defer></script>
</head>
<body>
<header><header-component></header-component></header>
<div class="sticky";>
<nav><div class="marginside";><nav-component></nav-component></div></nav>
</div>
<section>
<aside>
<p><strong></srong>TELA</strong><p>
<li><a class="side" href="#Links to another SCID">Links to another SCID</a></li>
<li><a class="side" href="#Terminal Things">Terminal Things</a></li>
</aside>
<article>
<h1>TELA</h1>
<p>Things I learned, found out about.</p>
<h2 id="Links to another SCID" class="anchored">Links to another SCID</h2>
<hr>
<p>To make a link to another Webapp.</p>
<p><code>tela://open/scid</code></p>
<p>For example if you want to make a link to a certain page from another SCID it would be something like this:</p>
<p><code>tela://open/scid/somepage.html</code></p>
<br>
<h2 id="Terminal Things" class="anchored">Terminal Things</h2>
<hr>
<p>Q: Is there a way to escape out of an install other than closing the terminal?</p>
<p>At any point `ctrl+d` can be used to go back to the main prompt.</p>
<p><code>ctrl+d</code></p>
<br>
<br>
<svg style="height: 150px; max-width: 95%;" id="titleImg" data-name="titleImg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1784.46 832.8">
<g id="Text">
<polygon class="cls-3"
points=".27 118.61 712.59 118.61 712.59 237.61 356.69 237.61 356.69 714.18 237.26 714.18 237.26 237.61 0 237.61 .27 118.61" />
<rect class="cls-3" x="475.31" y="356.72" width="237.27" height="119.41" />
<polygon class="cls-3"
points="475.27 594.79 831.2 594.79 831.2 118.61 950.62 118.61 950.62 594.79 1188.68 594.79 1188.68 118.61 1784.46 713.61 1615.41 713.61 1308.06 406.95 1308.06 713.61 475.27 713.61 475.27 594.79" />
<rect class="cls-2" x="356.69" y="714.2" width="118.61" height="118.61" />
<rect class="cls-1" x="712.59" width="118.61" height="118.61" />
</g>
</svg>
</article>
</section>
<footer-component></footer-component>
</body>
</html>
*/ |
SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "tela.html")
31 STORE("descrHdr", "AS's Playground")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "AS's Playground")
34 STORE("docType", "TELA-HTML-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "2a499cfc96037bffa943f97d42df3a64c242b1a8c575c806feebeb727f9467e1")
37 STORE("fileCheckS", "2d685a6c6f9760cb7215e919e80b8b7f891e29cc4e267dd8348b11a8b553a9f")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
<!DOCTYPE html>
<html lang="en">
<head>
<title>AS's Playground Live</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="header.js" type="text/javascript" defer></script>
<script src="nav.js" type="text/javascript" defer></script>
<script src="footer.js" type="text/javascript" defer></script>
</head>
<body>
<header><header-component></header-component></header>
<div class="sticky";>
<nav><div class="marginside";><nav-component></nav-component></div></nav>
</div>
<section>
<aside>
<p><strong></srong>TELA</strong><p>
<li><a class="side" href="#Links to another SCID">Links to another SCID</a></li>
<li><a class="side" href="#Terminal Things">Terminal Things</a></li>
</aside>
<article>
<h1>TELA</h1>
<p>Things I learned, found out about.</p>
<h2 id="Links to another SCID" class="anchored">Links to another SCID</h2>
<hr>
<p>To make a link to another Webapp.</p>
<p><code>tela://open/scid</code></p>
<p>For example if you want to make a link to a certain page from another SCID it would be something like this:</p>
<p><code>tela://open/scid/somepage.html</code></p>
<br>
<h2 id="Terminal Things" class="anchored">Terminal Things</h2>
<hr>
<p>Q: Is there a way to escape out of an install other than closing the terminal?</p>
<p>At any point `ctrl+d` can be used to go back to the main prompt.</p>
<p><code>ctrl+d</code></p>
<br>
<br>
<svg style="height: 150px; max-width: 95%;" id="titleImg" data-name="titleImg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1784.46 832.8">
<g id="Text">
<polygon class="cls-3"
points=".27 118.61 712.59 118.61 712.59 237.61 356.69 237.61 356.69 714.18 237.26 714.18 237.26 237.61 0 237.61 .27 118.61" />
<rect class="cls-3" x="475.31" y="356.72" width="237.27" height="119.41" />
<polygon class="cls-3"
points="475.27 594.79 831.2 594.79 831.2 118.61 950.62 118.61 950.62 594.79 1188.68 594.79 1188.68 118.61 1784.46 713.61 1615.41 713.61 1308.06 406.95 1308.06 713.61 475.27 713.61 475.27 594.79" />
<rect class="cls-2" x="356.69" y="714.2" width="118.61" height="118.61" />
<rect class="cls-1" x="712.59" width="118.61" height="118.61" />
</g>
</svg>
</article>
</section>
<footer-component></footer-component>
</body>
</html>
*/'] |