Skip to content

Commit 9250b47

Browse files
committed
Startup logic
1 parent ef2b543 commit 9250b47

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

iwsy/resources/ecs/iwsy.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,27 +103,26 @@
103103
put property `protocol` of Args into Protocol
104104
put property `domain` of Args into Domain
105105

106+
put `https://easycoder.github.io/iwsy` into CDN
106107
! Test if site is on a static host
107108
clear Static
108-
rest get Item from Protocol cat Domain cat `/test`
109+
rest get Item from Protocol cat Domain cat `/rest.php/test`
109110
or begin
110111
print `Static website`
111112
set Static
112113
clear IsHome
113-
put empty into CDN
114114
go to Start
115115
end
116116

117117
if Domain is `iwannashowyou.com` set IsHome else clear IsHome
118118
if IsHome put Protocol cat Domain into CDN
119-
else put `https://easycoder.github.io/iwsy` into CDN
120-
iwsy init CDN
121119

122120
! If the debug flag is set use admin storage but continue with local CDN
123121
get Item from storage as `debug`
124122
if Item is `true` clear IsHome
125123

126124
Start:
125+
iwsy init CDN
127126
put Static into storage as `.static`
128127
put IsHome into storage as `.ishome`
129128
put CDN into storage as `.cdn`
@@ -533,7 +532,7 @@ Start:
533532
put property `arg` of Args into Arg
534533
if Arg includes `.json`
535534
begin
536-
rest get Presentation from `/` cat Resources cat `/users/` cat Arg cat `?v=` cat now
535+
rest get Presentation from Protocol cat Domain cat `/` cat Resources cat `/users/` cat Arg cat `?v=` cat now
537536
gosub to NotifyModules
538537
iwsy script Presentation
539538
set style `display` of Player to `block`
@@ -907,12 +906,12 @@ SelectFile:
907906
if UserRecord go to SelectFromUser
908907
if IsHome go to SelectFromStorage
909908

910-
rest get Presentation from `/resources/scripts/` cat File cat `?v=` cat now
909+
rest get Presentation from Protocol cat Domain cat `/resources/scripts/` cat File cat `?v=` cat now
911910
go to UseFile
912911

913912
SelectFromUser:
914913
if UserRecord rest get Presentation from
915-
`/resources/users/` cat UserHome cat `/scripts/` cat File cat `?v=` cat now
914+
Protocol cat Domain cat `/resources/users/` cat UserHome cat `/scripts/` cat File cat `?v=` cat now
916915
go to UseFile
917916

918917
SelectFromStorage:

0 commit comments

Comments
 (0)