File tree Expand file tree Collapse file tree 2 files changed +43
-9
lines changed Expand file tree Collapse file tree 2 files changed +43
-9
lines changed Original file line number Diff line number Diff line change 47
47
variable PasswordRequested
48
48
variable PasswordValid
49
49
variable ReadOnly
50
+ variable Args
51
+ variable Arg
50
52
variable Name
53
+ variable CallStack
51
54
variable CurrentName
52
55
variable Content
53
56
variable Current
92
95
93
96
load showdown
94
97
rest get ECPayload from `/resources/fragment/ec.txt`
98
+ json parse url the location as Args
95
99
96
100
! create Tracer
97
101
! set attribute `id` of Tracer to `easycoder-tracer`
107
111
end
108
112
L2:
109
113
clear PasswordRequested
110
-
114
+ put empty into CallStack
115
+ history set
116
+ on restore
117
+ begin
118
+ put the json count of CallStack into N
119
+ if N is less than 2 stop
120
+ take 1 from N
121
+ json delete element N of CallStack
122
+ take 1 from N
123
+ put element N of CallStack into Step
124
+ go to SHP2
125
+ end
126
+
111
127
if portrait
112
128
begin
113
129
if mobile set Mobile else clear Mobile
487
503
end
488
504
end
489
505
end
506
+
507
+ put property `arg` of Args into Arg
508
+ if Arg is not empty
509
+ begin
510
+ put from 2 of Arg into Step
511
+ gosub to SHP2
512
+ end
490
513
491
514
set ready
492
515
stop
@@ -651,6 +674,10 @@ ShowContents:
651
674
stop
652
675
653
676
ShowHelpPage:
677
+ append Step to CallStack
678
+ SHP1:
679
+ history push url `?s=` cat Step
680
+ SHP2:
654
681
put Step into storage as `.step`
655
682
put `/resources/codex/code/` cat Step cat `.ecs` into Item
656
683
rest get Fragment from Item or begin end
Original file line number Diff line number Diff line change 34
34
variable Script
35
35
variable ButtonStyle
36
36
variable Message
37
+ variable Args
38
+ variable Arg
37
39
38
40
! create Tracer
39
41
! set attribute `id` of Tracer to `easycoder-tracer`
@@ -216,14 +218,7 @@ BuildPage:
216
218
set the style of CodexButton to ButtonStyle
217
219
set style `margin-top` of CodexButton to `0.25em`
218
220
set the text of CodexButton to `Codex`
219
- on click CodexButton
220
- begin
221
- load plugin `codemirror`
222
- rest get Script from `/resources/ecs/codex.ecs`
223
- send `pause` to CurrentModule
224
- set style `display` of Body to `none`
225
- run Script
226
- end
221
+ on click CodexButton go to RunCodex
227
222
228
223
create Notes in Main
229
224
create ShowNotes in Notes
@@ -241,8 +236,20 @@ DoNotes:
241
236
end
242
237
end
243
238
239
+ json parse url the location as Args
240
+ put property `arg` of Args into Arg
241
+ if Arg is not empty go to RunCodex
244
242
stop
245
243
244
+ RunCodex:
245
+ load plugin `codemirror`
246
+ rest get Script from `/resources/ecs/codex.ecs`
247
+ send `pause` to CurrentModule
248
+ set style `display` of Body to `none`
249
+ run Script
250
+ stop
251
+
252
+
246
253
DeselectAllButtons:
247
254
set style `background` of HomeButton to ``
248
255
set style `background` of IntroButton to ``
You can’t perform that action at this time.
0 commit comments