Skip to content

Commit

Permalink
Embed selected rule in the url when sharing.
Browse files Browse the repository at this point in the history
  • Loading branch information
omer-biz committed Sep 7, 2024
1 parent 391d5e5 commit 7b971e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions static/scripts/shareButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function tryLoadFromShareLink(codeMirror) {
"textarea.editor-input-text",
)!;
inputEditor.value = decoded["input"];
localStorage.setItem("last-selected-rule", decoded["selectedRule"]);
}
}

Expand All @@ -54,6 +55,7 @@ function shareData(codeMirror) {
input: document.querySelector<HTMLTextAreaElement>(
"textarea.editor-input-text",
)!.value,
selectedRule: localStorage.getItem("last-selected-rule") || "",
};
}

Expand Down

0 comments on commit 7b971e9

Please sign in to comment.