Skip to content

Commit

Permalink
refactor(page): move <script> to inside <body>
Browse files Browse the repository at this point in the history
  • Loading branch information
brainwo committed May 19, 2024
1 parent 997f0c8 commit 0596d6f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions templates/index.html.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@
</article>
{{/items}}
</div>
<script>
function copyUrl() {
navigator.clipboard.writeText(
"https://brainwo.github.io/hacktubernews/feed.xml"
);
let button = document.getElementById("copy");
button.innerText = "Copied!";
button.disabled = true;
}

document.addEventListener("DOMContentLoaded", function () {
var element = document.getElementById("copy");
element.style.display = "block";
});
</script>
</body>
<script>
function copyUrl() {
navigator.clipboard.writeText(
"https://brainwo.github.io/hacktubernews/feed.xml"
);
let button = document.getElementById("copy");
button.innerText = "Copied!";
button.disabled = true;
}

document.addEventListener("DOMContentLoaded", function () {
var element = document.getElementById("copy");
element.style.display = "block";
});
</script>
</html>

0 comments on commit 0596d6f

Please sign in to comment.