added 'copy with meta' option to add in info to the copied words todo: format all the date strings
This commit is contained in:
parent
4c77292b34
commit
0be081d7e8
@ -121,6 +121,14 @@ $(document).ready(function(){
|
||||
navigator.clipboard.writeText($("#poem_list").text());
|
||||
}); // copy text
|
||||
|
||||
$("#copy_text_meta").click(function(){
|
||||
const today = Date(Date.now());
|
||||
todayFormatted = today.toString();
|
||||
var poem_meta = "#dailyBlackoutPoetryChallenge\n\n" + $("#poem_list").text() + "\n\n" + book.title + " - " + todayFormatted;
|
||||
navigator.clipboard.writeText(poem_meta);
|
||||
}); // copy text
|
||||
|
||||
|
||||
// change the color of a clicked word; add/remove clicked word to list
|
||||
$(document).on('click', "#spina.unlock p span", function(e){
|
||||
// $("#spina.unlock p span").click(function(){
|
||||
@ -187,6 +195,7 @@ $(document).ready(function(){
|
||||
<h1>Copy Your Words</h1>
|
||||
<p>Copy the words you found here for alt-text, editing and archive! (Remember we don’t keep anything, so once you close this page, this poem is gone!)</P>
|
||||
<button id="copy_text">Copy</button>
|
||||
<button id="copy_text_meta">Copy with meta</button>
|
||||
<div id="poem_list"></div>
|
||||
</section>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user