Skip to content

Commit

Permalink
get save zone, even if iframe is reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestaSafe committed Aug 23, 2024
1 parent f4afbfc commit 957e44b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion _dev/src/components/LeftPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,17 @@ let currentBlock = useStore();
const state = ref({
name: "displayHome",
});
onMounted(() => {
document.addEventListener('DOMContentLoaded', async () => {
const clipboardData = await navigator.clipboard.readText();
try {
const data = JSON.parse(clipboardData);
showCopyZone.value = data.hasOwnProperty('zone');
} catch (error) {
showCopyZone.value = false;
}
});
})
/**
* Copy current zone
*/
Expand Down

0 comments on commit 957e44b

Please sign in to comment.