66
66
variable Data
67
67
variable Payload
68
68
variable ECPayload
69
+ variable Size
69
70
variable A
70
71
variable B
71
72
variable V
@@ -784,7 +785,7 @@ SHP4:
784
785
end
785
786
return
786
787
787
- ProcessMarkdown:
788
+ ProcessMarkdown: ! TODO Count the links & set up listeners
788
789
on DecoratorCallback go to Decorate
789
790
put 0 into LinkCount
790
791
set the content of HelpPanel to showdown decode Script with DecoratorCallback
@@ -798,8 +799,8 @@ ProcessMarkdown:
798
799
end
799
800
on click Link
800
801
begin
801
- put attribute `data-id` of Link into Data
802
- end
802
+ put attribute `data-id` of Link into Step
803
+ goto ShowHelpPage
803
804
end
804
805
return
805
806
@@ -831,6 +832,32 @@ Decorate:
831
832
begin
832
833
put `<button id="copy">Copy to editor</button>` into Payload
833
834
end
835
+ else if left 5 of Payload is `icon:`
836
+ begin
837
+ put from 5 of Payload into Payload
838
+ put the position of `:` in Payload into N
839
+ put left N of Payload into Name
840
+ add 1 to N
841
+ put from N of Payload into Payload
842
+ put the position of `:` in Payload into N
843
+ put left N of Payload into Size
844
+ add 1 to N
845
+ put from N of Payload into Payload
846
+ put `<img src="resources/icon/` cat Name
847
+ cat `.png" style="width:` cat Size cat `;height:` cat Size
848
+ cat `" title="` cat Payload cat `" />` into Payload
849
+ end
850
+ else if left 5 of Payload is `link:`
851
+ begin
852
+ put from 5 of Payload into Payload
853
+ put the position of `:` in Payload into N
854
+ put left N of Payload into Data
855
+ add 1 to N
856
+ put from N of Payload into Payload
857
+ put `<b><a href="" id="ec-link-` cat LinkCount cat `" data-id="` cat Data cat `">`
858
+ cat Payload cat `</a></b>` into Payload
859
+ add 1 to LinkCount
860
+ end
834
861
else if left 5 of Payload is `next:`
835
862
begin
836
863
put `<h2>Next: <a href="#" id="next">` cat from 5 of Payload into Payload
0 commit comments