-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsandbox.view.tree
60 lines (59 loc) · 1.53 KB
/
sandbox.view.tree
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
$hyoo_js_sandbox $mol_page
title @ \JavaScript Sandbox
tools /
<= Lights $mol_lights_toggle
<= Source $mol_link_source
uri \https://github.com/hyoo-ru/sandbox.js.hyoo.ru
plugins /
<= Theme $mol_theme_auto
theme => theme
<= Hotkey $mol_hotkey
mod_ctrl true
key * enter?event <=> run?event null
body /
<= Intro $mol_text
text <= intro @ \
\Only JS and Math functions and constants are available inside the sandbox.
\**Hack it if you might!**
<= Input $mol_bar sub /
<= Code $mol_textarea
hint \return 42
value?val <=> script?val \
<= Run $mol_button_major
hint <= run_hint @ \Run
click?event <=> run?event null
sub /
<= Run_icon $mol_icon_play
<= Result $mol_view
sub / <= result?val \
<= Snippets $mol_list rows <= snippets /
Snippet!id $hyoo_js_sandbox_snippet
code <= snippet_code!id \
snippet_codes /
\
\return document.cookie
\
\let evil = eval
\return evil( 'document.cookie' )
\
\let Function = ( function*(){} ).constructor
\let getCookie = Function( 'return document.cookie' )
\return getCookie().next().value
\
\let Function = sin.constructor
\let getCookie = Function( 'return document.cookie' )
\return getCookie()
\
\let NumberProto = (0n).__proto__
\NumberProto.toString = null
\
\sin.call = ()=> 0
\return sin.call
\
\return import( 'https://example.org/' + PI )
$hyoo_js_sandbox_snippet $mol_link
arg * script <= code \
sub /
<= Text $mol_text
attr * mol_theme <= theme_content \
text <= text <= code \