diff --git a/src/Main.elm b/src/Main.elm index 77fbeee..672e6fa 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -28,7 +28,7 @@ import List.Extra exposing (elemIndex, getAt) import Maybe exposing (andThen) import Maybe.Extra exposing (isJust) import Result exposing (toMaybe) -import String exposing (fromInt, isEmpty, replace, toLower) +import String exposing (dropLeft, fromInt, isEmpty, replace, toLower) import String.Extra exposing (isBlank) import Svg exposing (path, Svg, svg) import Svg.Attributes exposing (d, fill, height, stroke, viewBox, width) @@ -394,6 +394,7 @@ save model = |> CE.encode |> B64E.bytes |> B64E.encode + |> dropLeft 1 |> replace "=" "" |> (++) "#" |> pushUrl model.browserKey @@ -401,6 +402,7 @@ save model = load : Key -> Url -> Maybe Model load key url = url.fragment + |> Maybe.map ((++) "g") |> andThen (B64D.decode B64D.bytes >> toMaybe) |> andThen (CD.decode (loadModel key))