Skip to content

Commit 0dfc21d

Browse files
committed
Use 'code' as query param
1 parent 409795b commit 0dfc21d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Most of these features can be controlled not only from the toolbar, but also usi
2828
- Example: `gist=37c3c97f47a43f20c548`
2929
- Notes: the file should be named `Main.purs` with the module name `Main`.
3030

31-
- **Load From URL**: Load compressed PureScript code using the `purs` parameter
31+
- **Load From URL**: Load compressed PureScript code using the `code` parameter
3232
- Managed by Try PureScript and updated on editor state change to create shareable URLs
33-
- Format: `purs=<compressed string>`
34-
- Example: `purs=LYewJgrgNgpgBAWQIYEsB2cDuALGAnGIA` will set the editor state to the single line `module Main where`
33+
- Format: `code=<compressed string>`
34+
- Example: `code=LYewJgrgNgpgBAWQIYEsB2cDuALGAnGIA` will set the editor state to the single line `module Main where`
3535

3636
- **View Mode**: Control the view mode using the `view` parameter
3737
- Options are: `code`, `output`, `both` (default)

client/src/Try/Container.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ component = H.mkComponent
141141
handleAction $ Compile Nothing
142142

143143
EncodeInURL text -> H.liftEffect do
144-
setQueryString "purs" $ compressToEncodedURIComponent text
144+
setQueryString "code" $ compressToEncodedURIComponent text
145145

146146
Compile mbCode -> do
147147
H.modify_ _ { compiled = Nothing }
@@ -545,7 +545,7 @@ toAnnotation markerType { position, message } =
545545

546546
withSession :: Aff { sourceFile :: Maybe SourceFile, code :: String }
547547
withSession = do
548-
state <- H.liftEffect $ getQueryStringMaybe "purs"
548+
state <- H.liftEffect $ getQueryStringMaybe "code"
549549
githubId <- H.liftEffect $ getQueryStringMaybe "github"
550550
gistId <- H.liftEffect $ getQueryStringMaybe "gist"
551551
code <- case state >>= decompressFromEncodedURIComponent of

0 commit comments

Comments
 (0)