Skip to content

Commit

Permalink
remove script form dinam updat content
Browse files Browse the repository at this point in the history
  • Loading branch information
Ujstor committed Feb 2, 2025
1 parent c401be2 commit 7f17dcd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 0 additions & 11 deletions blueprint-ui/cmd/web/components/folderstructure.templ
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ templ FolderStructure(options OptionsStruct, commandStr string) {
</code>
</pre>
</div>
<script>
let text = document.getElementById('command').innerHTML;
const copyContent = async () => {
try {
await navigator.clipboard.writeText(text);
console.log('Content copied to clipboard');
} catch (err) {
console.error('Failed to copy: ', err);
}
}
</script>
<div class="bg-white mt-2 shadow sm:rounded-lg">
<div class="px-4 py-5 sm:p-6">
<div class="flex items-center">
Expand Down
11 changes: 11 additions & 0 deletions blueprint-ui/cmd/web/home.templ
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,16 @@ templ Home() {
@components.Form()
</div>
</main>
<script>
function copyCommandContent() {
const commandEl = document.getElementById('command');
if (commandEl) {
navigator.clipboard.writeText(commandEl.innerText)
.then(() => console.log('Content copied to clipboard'))
.catch(err => console.error('Failed to copy: ', err));
}
}
</script>

}
}

0 comments on commit 7f17dcd

Please sign in to comment.