Skip to content

Commit

Permalink
Add title to share
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Yuan <[email protected]>
  • Loading branch information
juntao committed Sep 28, 2024
1 parent 2bc1574 commit 2bda043
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
console.log(data);
if (data['status']) {
document.title = data["subject"];
document.getElementById('share-btn').setAttribute('data-title', data["subject"]);
document.getElementById("subject").innerHTML = data["subject"];
document.getElementById("body").innerHTML = "<b><i>" + data["question"] + "</i></b><br>" + marked.parse(data["body"]);
} else {
Expand All @@ -65,7 +66,7 @@ <h1 id="subject">Please wait ...</h1>
</div>
<div class="email-body" id="body">
</div>
<div class="share-btn">
<div class="share-btn" id="share-btn">
<a class="btn-facebook" data-id="fb"><i class="fab fa-facebook-square"></i> Facebook</a>
<a class="btn-twitter" data-id="tw"><i class="fab fa-twitter"></i> Twitter</a>
<a class="btn-telegram" data-id="tg"><i class="fab fa-telegram"></i> Telegram</a>
Expand Down

0 comments on commit 2bda043

Please sign in to comment.