diff -r d5fad7d80899 -r dfc850e6ee1f www/js/rec_forum.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/js/rec_forum.js Tue Dec 10 20:11:37 2019 +0100 @@ -0,0 +1,27 @@ + +$(document).ready(function() { + + /** + * This will copy the innerHTML of an element to the clipboard + * @param element reference OR string + */ + function copyToClipboard(e) { + var tempItem = document.createElement('textarea'); + + document.body.appendChild(tempItem); + tempItem.value = e; + tempItem.select(); + document.execCommand('Copy'); + + tempItem.parentElement.removeChild(tempItem); + } + + + $('#copytoClipboard').jqxButton({ template: 'success', theme: theme, width: 150 }); + $('#copytoClipboard').click(function() { + copyToClipboard(forumstr); + window.close(); + }); + +}); +